diff options
author | Shahbaz Youssefi <syoussefi@chromium.org> | 2022-04-13 14:18:06 -0400 |
---|---|---|
committer | Angle LUCI CQ <angle-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-20 05:05:22 +0000 |
commit | fcec69045d1945b96455e973068a1375a654804f (patch) | |
tree | 42e3101f283c7a9cacbf619d91726bd20576508b | |
parent | f4fc8e1688f599f2f4fdac3afc05cfa3c9155c5a (diff) | |
download | angle-fcec69045d1945b96455e973068a1375a654804f.tar.gz |
Generate feature variable names from display names
The json file now only contains the feature display name. The variable
name is automaticaly derived.
For consistence with Chromium and other Chromium-based projects, the
display name is now always snake_case, and that's what's specified in
the json files. This also makes camelCase variable name generation
trivial (as opposed to the other way around).
Feature overrides now accept both snake_case and camelCase names to
ensure compatibility with existing scripts. This is done by removing _
and comparing override names with feature names in lower case.
Bug: angleproject:6435
Change-Id: I0b6ed2bbf5c312bc4f4be7b3c7d55dbaca2a9886
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584630
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
43 files changed, 838 insertions, 927 deletions
diff --git a/include/platform/Feature.h b/include/platform/Feature.h index a026d1126f..c31b09345d 100644 --- a/include/platform/Feature.h +++ b/include/platform/Feature.h @@ -176,24 +176,8 @@ struct FeatureSetBase FeatureMap members = FeatureMap(); public: - void overrideFeatures(const std::vector<std::string> &featureNames, bool enabled) - { - for (const std::string &name : featureNames) - { - if (members.find(name) != members.end()) - { - members[name]->enabled = enabled; - } - } - } - - void populateFeatureList(FeatureList *features) const - { - for (FeatureMap::const_iterator it = members.begin(); it != members.end(); it++) - { - features->push_back(it->second); - } - } + void overrideFeatures(const std::vector<std::string> &featureNames, bool enabled); + void populateFeatureList(FeatureList *features) const; const FeatureMap &getFeatures() const { return members; } }; diff --git a/include/platform/FeaturesD3D.h b/include/platform/FeaturesD3D.h index 67c29201d5..c546e8dd13 100644 --- a/include/platform/FeaturesD3D.h +++ b/include/platform/FeaturesD3D.h @@ -21,48 +21,48 @@ struct FeaturesD3D : FeatureSetBase ~FeaturesD3D(); FeatureInfo mrtPerfWorkaround = { - "mrt_perf_workaround", + "mrtPerfWorkaround", FeatureCategory::D3DWorkarounds, "Some drivers have a bug where they ignore null render targets", &members, }; FeatureInfo setDataFasterThanImageUpload = { - "set_data_faster_than_image_upload", + "setDataFasterThanImageUpload", FeatureCategory::D3DWorkarounds, "Set data faster than image upload", &members, }; FeatureInfo zeroMaxLodWorkaround = { - "zero_max_lod", + "zeroMaxLodWorkaround", FeatureCategory::D3DWorkarounds, "Missing an option to disable mipmaps on a mipmapped texture", &members, }; FeatureInfo useInstancedPointSpriteEmulation = { - "use_instanced_point_sprite_emulation", + "useInstancedPointSpriteEmulation", FeatureCategory::D3DWorkarounds, "Some D3D11 renderers do not support geometry shaders for pointsprite emulation", &members, }; FeatureInfo depthStencilBlitExtraCopy = { - "depth_stencil_blit_extra_copy", 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"}; FeatureInfo expandIntegerPowExpressions = { - "expand_integer_pow_expressions", + "expandIntegerPowExpressions", FeatureCategory::D3DWorkarounds, "The HLSL optimizer has a bug with optimizing 'pow' in certain integer-valued expressions", &members, }; FeatureInfo flushAfterEndingTransformFeedback = { - "flush_after_ending_transform_feedback", + "flushAfterEndingTransformFeedback", FeatureCategory::D3DWorkarounds, "Some drivers sometimes write out-of-order results to StreamOut buffers when transform " "feedback is used to repeatedly write to the same buffer positions", @@ -70,7 +70,7 @@ struct FeaturesD3D : FeatureSetBase }; FeatureInfo getDimensionsIgnoresBaseLevel = { - "get_dimensions_ignores_base_level", + "getDimensionsIgnoresBaseLevel", FeatureCategory::D3DWorkarounds, "Some drivers do not take into account the base level of the " "texture in the results of the HLSL GetDimensions builtin", @@ -78,7 +78,7 @@ struct FeaturesD3D : FeatureSetBase }; FeatureInfo preAddTexelFetchOffsets = { - "pre_add_texel_fetch_offsets", + "preAddTexelFetchOffsets", FeatureCategory::D3DWorkarounds, "HLSL's function texture.Load returns 0 when the parameter Location is negative, even if " "the sum of Offset and Location is in range", @@ -86,14 +86,14 @@ struct FeaturesD3D : FeatureSetBase }; FeatureInfo emulateTinyStencilTextures = { - "emulate_tiny_stencil_textures", + "emulateTinyStencilTextures", FeatureCategory::D3DWorkarounds, "1x1 and 2x2 mips of depth/stencil textures aren't sampled correctly", &members, }; FeatureInfo disableB5G6R5Support = { - "disable_b5g6r5_support", + "disableB5G6R5Support", FeatureCategory::D3DWorkarounds, "Textures with the format " "DXGI_FORMAT_B5G6R5_UNORM have incorrect data", @@ -101,28 +101,28 @@ struct FeaturesD3D : FeatureSetBase }; FeatureInfo rewriteUnaryMinusOperator = { - "rewrite_unary_minus_operator", + "rewriteUnaryMinusOperator", FeatureCategory::D3DWorkarounds, "Evaluating unary minus operator on integer may get wrong answer in vertex shaders", &members, }; - FeatureInfo emulateIsnanFloat = {"emulate_isnan_float", FeatureCategory::D3DWorkarounds, + FeatureInfo emulateIsnanFloat = {"emulateIsnanFloat", FeatureCategory::D3DWorkarounds, "Using isnan() on highp float will get wrong answer", &members, "https://crbug.com/650547"}; - FeatureInfo callClearTwice = {"call_clear_twice", FeatureCategory::D3DWorkarounds, + FeatureInfo callClearTwice = {"callClearTwice", FeatureCategory::D3DWorkarounds, "Using clear() may not take effect", &members, "https://crbug.com/655534"}; FeatureInfo useSystemMemoryForConstantBuffers = { - "use_system_memory_for_constant_buffers", FeatureCategory::D3DWorkarounds, + "useSystemMemoryForConstantBuffers", FeatureCategory::D3DWorkarounds, "Copying from staging storage to constant buffer " "storage does not work", &members, "https://crbug.com/593024"}; FeatureInfo selectViewInGeometryShader = { - "select_view_in_geometry_shader", + "selectViewInGeometryShader", FeatureCategory::D3DWorkarounds, "The viewport or render target slice will be selected in the geometry shader stage for " "the ANGLE_multiview extension", @@ -130,36 +130,36 @@ struct FeaturesD3D : FeatureSetBase }; FeatureInfo addMockTextureNoRenderTarget = { - "add_mock_texture_no_render_target", 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"}; FeatureInfo skipVSConstantRegisterZero = { - "skip_vs_constant_register_zero", + "skipVSConstantRegisterZero", FeatureCategory::D3DWorkarounds, "In specific cases the driver doesn't handle constant register zero correctly", &members, }; FeatureInfo forceAtomicValueResolution = { - "force_atomic_value_resolution", 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"}; FeatureInfo allowClearForRobustResourceInit = { - "allow_clear_for_robust_resource_init", FeatureCategory::D3DWorkarounds, + "allowClearForRobustResourceInit", FeatureCategory::D3DWorkarounds, "Some drivers corrupt texture data when clearing for robust resource initialization.", &members, "http://crbug.com/941620"}; FeatureInfo allowTranslateUniformBlockToStructuredBuffer = { - "allow_translate_uniform_block_to_structured_buffer", 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"}; - FeatureInfo allowES3OnFL10_0 = { - "allowES3OnFL10_0", + FeatureInfo allowES3OnFL100 = { + "allowES3OnFL100", FeatureCategory::D3DWorkarounds, "Allow ES3 on 10.0 devices", &members, diff --git a/include/platform/FeaturesGL.h b/include/platform/FeaturesGL.h index db74f307b3..50a4b6a3dc 100644 --- a/include/platform/FeaturesGL.h +++ b/include/platform/FeaturesGL.h @@ -21,162 +21,162 @@ struct FeaturesGL : FeatureSetBase ~FeaturesGL(); FeatureInfo avoid1BitAlphaTextureFormats = { - "avoid_1_bit_alpha_texture_formats", + "avoid1BitAlphaTextureFormats", FeatureCategory::OpenGLWorkarounds, "Issue with 1-bit alpha framebuffer formats", &members, }; - FeatureInfo rgba4IsNotSupportedForColorRendering = { - "rgba4_is_not_supported_for_color_rendering", + FeatureInfo RGBA4IsNotSupportedForColorRendering = { + "RGBA4IsNotSupportedForColorRendering", FeatureCategory::OpenGLWorkarounds, "GL_RGBA4 is not color renderable", &members, }; - FeatureInfo allowEtcFormats = { - "allow_etc_formats", + FeatureInfo allowETCFormats = { + "allowETCFormats", FeatureCategory::OpenGLWorkarounds, "Enable ETC2/EAC on desktop OpenGL", &members, }; FeatureInfo doesSRGBClearsOnLinearFramebufferAttachments = { - "does_srgb_clears_on_linear_framebuffer_attachments", + "doesSRGBClearsOnLinearFramebufferAttachments", FeatureCategory::OpenGLWorkarounds, "Issue clearing framebuffers with linear attachments when GL_FRAMEBUFFER_SRGB is enabled", &members, }; FeatureInfo doWhileGLSLCausesGPUHang = { - "do_while_glsl_causes_gpu_hang", FeatureCategory::OpenGLWorkarounds, + "doWhileGLSLCausesGPUHang", FeatureCategory::OpenGLWorkarounds, "Some GLSL constructs involving do-while loops cause GPU hangs", &members, "http://crbug.com/644669"}; - FeatureInfo addBaseVertexToVertexID = { - "vertex_id_does_not_include_base_vertex", + FeatureInfo vertexIDDoesNotIncludeBaseVertex = { + "vertexIDDoesNotIncludeBaseVertex", FeatureCategory::OpenGLWorkarounds, "gl_VertexID in GLSL vertex shader doesn't include base vertex value", &members, }; FeatureInfo finishDoesNotCauseQueriesToBeAvailable = { - "finish_does_not_cause_queries_to_be_available", + "finishDoesNotCauseQueriesToBeAvailable", FeatureCategory::OpenGLWorkarounds, "glFinish doesn't cause all queries to report available result", &members, }; FeatureInfo alwaysCallUseProgramAfterLink = { - "always_call_use_program_after_link", FeatureCategory::OpenGLWorkarounds, + "alwaysCallUseProgramAfterLink", FeatureCategory::OpenGLWorkarounds, "Always call useProgram after a successful link to avoid a driver bug", &members, "http://crbug.com/110263"}; FeatureInfo unpackOverlappingRowsSeparatelyUnpackBuffer = { - "unpack_overlapping_rows_separately_unpack_buffer", + "unpackOverlappingRowsSeparatelyUnpackBuffer", FeatureCategory::OpenGLWorkarounds, "In the case of unpacking from a pixel unpack buffer, unpack overlapping rows row by row", &members, }; FeatureInfo packOverlappingRowsSeparatelyPackBuffer = { - "pack_overlapping_rows_separately_pack_buffer", + "packOverlappingRowsSeparatelyPackBuffer", FeatureCategory::OpenGLWorkarounds, "In the case of packing to a pixel pack buffer, pack overlapping rows row by row", &members, }; FeatureInfo initializeCurrentVertexAttributes = { - "initialize_current_vertex_attributes", + "initializeCurrentVertexAttributes", FeatureCategory::OpenGLWorkarounds, "During initialization, assign the current vertex attributes to the spec-mandated defaults", &members, }; - FeatureInfo emulateAbsIntFunction = {"emulate_abs_int_function", + FeatureInfo emulateAbsIntFunction = {"emulateAbsIntFunction", FeatureCategory::OpenGLWorkarounds, "abs(i) where i is an integer returns unexpected result", &members, "http://crbug.com/642227"}; FeatureInfo addAndTrueToLoopCondition = { - "add_and_true_to_loop_condition", + "addAndTrueToLoopCondition", FeatureCategory::OpenGLWorkarounds, "Calculation of loop conditions in for and while loop has bug", &members, }; FeatureInfo unpackLastRowSeparatelyForPaddingInclusion = { - "unpack_last_row_separately_for_padding_inclusion", FeatureCategory::OpenGLWorkarounds, + "unpackLastRowSeparatelyForPaddingInclusion", FeatureCategory::OpenGLWorkarounds, "When uploading textures from an unpack buffer, some drivers count an extra row padding", &members, "http://anglebug.com/1512"}; FeatureInfo packLastRowSeparatelyForPaddingInclusion = { - "pack_last_row_separately_for_padding_inclusion", FeatureCategory::OpenGLWorkarounds, + "packLastRowSeparatelyForPaddingInclusion", FeatureCategory::OpenGLWorkarounds, "When uploading textures from an pack buffer, some drivers count an extra row padding", &members, "http://anglebug.com/1512"}; - FeatureInfo emulateIsnanFloat = {"emulate_isnan_float", FeatureCategory::OpenGLWorkarounds, + FeatureInfo emulateIsnanFloat = {"emulateIsnanFloat", FeatureCategory::OpenGLWorkarounds, "Using isnan() on highp float will get wrong answer", &members, "http://crbug.com/650547"}; FeatureInfo useUnusedBlocksWithStandardOrSharedLayout = { - "use_unused_blocks_with_standard_or_shared_layout", + "useUnusedBlocksWithStandardOrSharedLayout", FeatureCategory::OpenGLWorkarounds, "Unused std140 or shared uniform blocks will be treated as inactive", &members, }; FeatureInfo removeInvariantAndCentroidForESSL3 = { - "remove_invarient_and_centroid_for_essl3", + "removeInvariantAndCentroidForESSL3", FeatureCategory::OpenGLWorkarounds, "Fix spec difference between GLSL 4.1 or lower and ESSL3", &members, }; FeatureInfo rewriteFloatUnaryMinusOperator = { - "rewrite_float_unary_minus_operator", FeatureCategory::OpenGLWorkarounds, + "rewriteFloatUnaryMinusOperator", FeatureCategory::OpenGLWorkarounds, "Using '-<float>' will get wrong answer", &members, "http://crbug.com/308366"}; - FeatureInfo emulateAtan2Float = {"emulate_atan_2_float", FeatureCategory::OpenGLWorkarounds, + FeatureInfo emulateAtan2Float = {"emulateAtan2Float", FeatureCategory::OpenGLWorkarounds, "atan(y, x) may return a wrong answer", &members, "http://crbug.com/672380"}; FeatureInfo reapplyUBOBindingsAfterUsingBinaryProgram = { - "reapply_ubo_bindings_after_using_binary_program", FeatureCategory::OpenGLWorkarounds, + "reapplyUBOBindingsAfterUsingBinaryProgram", FeatureCategory::OpenGLWorkarounds, "Some drivers forget about UBO bindings when using program binaries", &members, "http://anglebug.com/1637"}; FeatureInfo emulateMaxVertexAttribStride = { - "emulate_max_vertex_attrib_stride", FeatureCategory::OpenGLWorkarounds, + "emulateMaxVertexAttribStride", FeatureCategory::OpenGLWorkarounds, "Some drivers return 0 when MAX_VERTEX_ATTRIB_STRIED queried", &members, "http://anglebug.com/1936"}; FeatureInfo dontInitializeUninitializedLocals = { - "dont_initialize_uninitialized_locals", FeatureCategory::OpenGLWorkarounds, + "dontInitializeUninitializedLocals", FeatureCategory::OpenGLWorkarounds, "Initializing uninitialized locals caused odd behavior in a few WebGL 2 tests", &members, "http://anglebug.com/2046"}; FeatureInfo clampPointSize = { - "clamp_point_size", + "clampPointSize", FeatureCategory::OpenGLWorkarounds, "The point size range reported from the API is inconsistent with the actual behavior", &members, }; FeatureInfo dontUseLoopsToInitializeVariables = { - "dont_use_loops_to_initialize_variables", FeatureCategory::OpenGLWorkarounds, + "dontUseLoopsToInitializeVariables", FeatureCategory::OpenGLWorkarounds, "For loops used to initialize variables hit native GLSL compiler bugs", &members, "http://crbug.com/809422"}; FeatureInfo clampFragDepth = { - "clamp_frag_depth", + "clampFragDepth", FeatureCategory::OpenGLWorkarounds, "gl_FragDepth is not clamped correctly when rendering to a floating point depth buffer", &members, }; FeatureInfo rewriteRepeatedAssignToSwizzled = { - "rewrite_repeated_assign_to_swizzled", + "rewriteRepeatedAssignToSwizzled", FeatureCategory::OpenGLWorkarounds, "Repeated assignment to swizzled values inside a " "GLSL user-defined function have incorrect results", @@ -184,106 +184,106 @@ struct FeaturesGL : FeatureSetBase }; FeatureInfo disableBlendFuncExtended = { - "disable_blend_func_extended", FeatureCategory::OpenGLWorkarounds, + "disableBlendFuncExtended", FeatureCategory::OpenGLWorkarounds, "ARB_blend_func_extended does not pass the tests", &members, "http://anglebug.com/1085"}; - FeatureInfo unsizedsRGBReadPixelsDoesntTransform = { - "unsized_srgb_read_pixels_doesnt_transform", FeatureCategory::OpenGLWorkarounds, + FeatureInfo unsizedSRGBReadPixelsDoesntTransform = { + "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"}; FeatureInfo queryCounterBitsGeneratesErrors = { - "query_counter_bits_generates_errors", FeatureCategory::OpenGLWorkarounds, + "queryCounterBitsGeneratesErrors", FeatureCategory::OpenGLWorkarounds, "Drivers generate errors when querying the number of bits in timer queries", &members, "http://anglebug.com/3027"}; FeatureInfo dontRelinkProgramsInParallel = { - "dont_relink_programs_in_parallel", FeatureCategory::OpenGLWorkarounds, + "dontRelinkProgramsInParallel", FeatureCategory::OpenGLWorkarounds, "Relinking a program in parallel is buggy", &members, "http://anglebug.com/3045"}; - FeatureInfo disableWorkerContexts = {"disable_worker_contexts", + FeatureInfo disableWorkerContexts = {"disableWorkerContexts", FeatureCategory::OpenGLWorkarounds, "Some tests have been seen to fail using worker contexts", &members, "http://crbug.com/849576"}; - FeatureInfo limitMaxTextureSizeTo4096 = {"max_texture_size_limit_4096", + FeatureInfo limitMaxTextureSizeTo4096 = {"limitMaxTextureSizeTo4096", FeatureCategory::OpenGLWorkarounds, "Limit max texture size to 4096 to avoid frequent " "out-of-memory errors", &members, "http://crbug.com/927470"}; FeatureInfo limitMaxMSAASamplesTo4 = { - "max_msaa_sample_count_4", FeatureCategory::OpenGLWorkarounds, + "limitMaxMSAASamplesTo4", FeatureCategory::OpenGLWorkarounds, "Various rendering bugs have been observed when using higher MSAA counts", &members, "http://crbug.com/797243"}; FeatureInfo allowClearForRobustResourceInit = { - "allow_clear_for_robust_resource_init", 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"}; - FeatureInfo clampArrayAccess = {"clamp_array_access", FeatureCategory::OpenGLWorkarounds, + FeatureInfo clampArrayAccess = {"clampArrayAccess", FeatureCategory::OpenGLWorkarounds, "Clamp uniform array access to avoid reading invalid memory.", &members, "http://anglebug.com/2978"}; FeatureInfo resetTexImage2DBaseLevel = { - "reset_teximage2d_base_level", FeatureCategory::OpenGLWorkarounds, + "resetTexImage2DBaseLevel", FeatureCategory::OpenGLWorkarounds, "Reset texture base level before calling glTexImage2D to " "work around pixel comparison failure.", &members, "https://crbug.com/705865"}; FeatureInfo clearToZeroOrOneBroken = { - "clear_to_zero_or_one_broken", FeatureCategory::OpenGLWorkarounds, + "clearToZeroOrOneBroken", FeatureCategory::OpenGLWorkarounds, "Clears when the clear color is all zeros or ones do not work.", &members, "https://crbug.com/710443"}; FeatureInfo limitMax3dArrayTextureSizeTo1024 = { - "max_3d_array_texture_size_1024", 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"}; - FeatureInfo adjustSrcDstRegionBlitFramebuffer = { - "adjust_src_dst_region_for_blitframebuffer", FeatureCategory::OpenGLWorkarounds, + FeatureInfo adjustSrcDstRegionForBlitFramebuffer = { + "adjustSrcDstRegionForBlitFramebuffer", FeatureCategory::OpenGLWorkarounds, "Many platforms have issues with blitFramebuffer when the parameters are large.", &members, "http://crbug.com/830046"}; - FeatureInfo clipSrcRegionBlitFramebuffer = { - "clip_src_region_for_blitframebuffer", FeatureCategory::OpenGLWorkarounds, + FeatureInfo clipSrcRegionForBlitFramebuffer = { + "clipSrcRegionForBlitFramebuffer", FeatureCategory::OpenGLWorkarounds, "Issues with blitFramebuffer when the parameters don't match the framebuffer size.", &members, "http://crbug.com/830046"}; - FeatureInfo rgbDXT1TexturesSampleZeroAlpha = { - "rgb_dxt1_textures_sample_zero_alpha", FeatureCategory::OpenGLWorkarounds, + FeatureInfo RGBDXT1TexturesSampleZeroAlpha = { + "RGBDXT1TexturesSampleZeroAlpha", FeatureCategory::OpenGLWorkarounds, "Sampling BLACK texels from RGB DXT1 textures returns transparent black on Mac.", &members, "http://anglebug.com/3729"}; FeatureInfo unfoldShortCircuits = { - "unfold_short_circuits", FeatureCategory::OpenGLWorkarounds, + "unfoldShortCircuits", FeatureCategory::OpenGLWorkarounds, "Mac incorrectly executes both sides of && and || expressions when they should " "short-circuit.", &members, "http://anglebug.com/482"}; FeatureInfo emulatePrimitiveRestartFixedIndex = { - "emulate_primitive_restart_fixed_index", 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"}; FeatureInfo setPrimitiveRestartFixedIndexForDrawArrays = { - "set_primitive_restart_fixed_index_for_draw_arrays", 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"}; FeatureInfo removeDynamicIndexingOfSwizzledVector = { - "remove_dynamic_indexing_of_swizzled_vector", FeatureCategory::OpenGLWorkarounds, + "removeDynamicIndexingOfSwizzledVector", FeatureCategory::OpenGLWorkarounds, "Dynamic indexing of swizzled l-values doesn't work correctly on various platforms.", &members, "http://crbug.com/709351"}; FeatureInfo preAddTexelFetchOffsets = { - "pre_add_texel_fetch_offsets", 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, " @@ -291,156 +291,155 @@ struct FeaturesGL : FeatureSetBase &members, "http://crbug.com/642605"}; FeatureInfo regenerateStructNames = { - "regenerate_struct_names", 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"}; FeatureInfo readPixelsUsingImplementationColorReadFormatForNorm16 = { - "read_pixels_using_implementation_color_read_format", 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"}; FeatureInfo flushBeforeDeleteTextureIfCopiedTo = { - "flush_before_delete_texture_if_copied_to", 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"}; FeatureInfo rewriteRowMajorMatrices = { - "rewrite_row_major_matrices", FeatureCategory::OpenGLWorkarounds, + "rewriteRowMajorMatrices", FeatureCategory::OpenGLWorkarounds, "Rewrite row major matrices in shaders as column major as a driver bug workaround", &members, "http://anglebug.com/2273"}; FeatureInfo disableDrawBuffersIndexed = { - "disable_draw_buffers_indexed", + "disableDrawBuffersIndexed", FeatureCategory::OpenGLWorkarounds, "Disable OES_draw_buffers_indexed extension.", &members, }; - FeatureInfo disableSemaphoreFd = {"disable_semaphore_fd", FeatureCategory::OpenGLWorkarounds, + FeatureInfo disableSemaphoreFd = {"disableSemaphoreFd", FeatureCategory::OpenGLWorkarounds, "Disable GL_EXT_semaphore_fd extension", &members, "https://crbug.com/1046462"}; FeatureInfo disableTimestampQueries = { - "disable_timestamp_queries", FeatureCategory::OpenGLWorkarounds, + "disableTimestampQueries", FeatureCategory::OpenGLWorkarounds, "Disable GL_EXT_disjoint_timer_query extension", &members, "https://crbug.com/811661"}; - FeatureInfo encodeAndDecodeSRGBForGenerateMipmap = { - "decode_encode_srgb_for_generatemipmap", FeatureCategory::OpenGLWorkarounds, + FeatureInfo decodeEncodeSRGBForGenerateMipmap = { + "decodeEncodeSRGBForGenerateMipmap", FeatureCategory::OpenGLWorkarounds, "Decode and encode before generateMipmap for srgb format textures.", &members, "http://anglebug.com/4646"}; FeatureInfo emulateCopyTexImage2DFromRenderbuffers = { - "emulate_copyteximage2d_from_renderbuffers", FeatureCategory::OpenGLWorkarounds, + "emulateCopyTexImage2DFromRenderbuffers", FeatureCategory::OpenGLWorkarounds, "CopyTexImage2D spuriously returns errors on iOS when copying from renderbuffers.", &members, "https://anglebug.com/4674"}; FeatureInfo disableGPUSwitchingSupport = { - "disable_gpu_switching_support", FeatureCategory::OpenGLWorkarounds, + "disableGPUSwitchingSupport", FeatureCategory::OpenGLWorkarounds, "Disable GPU switching support (use only the low-power GPU) on older MacBook Pros.", &members, "https://crbug.com/1091824"}; FeatureInfo disableNativeParallelCompile = { - "disable_native_parallel_compile", FeatureCategory::OpenGLWorkarounds, + "disableNativeParallelCompile", FeatureCategory::OpenGLWorkarounds, "Do not use native KHR_parallel_shader_compile even when available.", &members, "http://crbug.com/1094869"}; FeatureInfo emulatePackSkipRowsAndPackSkipPixels = { - "emulate_pack_skip_rows_and_pack_skip_pixels", FeatureCategory::OpenGLWorkarounds, + "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 = { - "clamp_msc_rate", FeatureCategory::OpenGLWorkarounds, + "clampMscRate", FeatureCategory::OpenGLWorkarounds, "Some drivers return bogus values for GetMscRate, so we clamp it to 30Hz", &members, "https://crbug.com/1042393"}; FeatureInfo bindTransformFeedbackBufferBeforeBindBufferRange = { - "bind_transform_feedback_buffer_before_bind_buffer_range", - FeatureCategory::OpenGLWorkarounds, + "bindTransformFeedbackBufferBeforeBindBufferRange", FeatureCategory::OpenGLWorkarounds, "Bind transform feedback buffers to the generic binding point before calling " "glBindBufferBase or glBindBufferRange.", &members, "https://anglebug.com/5140"}; FeatureInfo disableSyncControlSupport = { - "disable_sync_control_support", 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"}; FeatureInfo keepBufferShadowCopy = { - "keep_buffer_shadow_copy", + "keepBufferShadowCopy", FeatureCategory::OpenGLWorkarounds, "Maintain a shadow copy of buffer data when the GL API does not permit reading data back.", &members, }; FeatureInfo setZeroLevelBeforeGenerateMipmap = { - "set_zero_level_before_generating_mipmap", + "setZeroLevelBeforeGenerateMipmap", FeatureCategory::OpenGLWorkarounds, "glGenerateMipmap fails if the zero texture level is not set on some Mac drivers.", &members, }; FeatureInfo promotePackedFormatsTo8BitPerChannel = { - "promote_packed_formats_to_8_bit_per_channel", FeatureCategory::OpenGLWorkarounds, + "promotePackedFormatsTo8BitPerChannel", FeatureCategory::OpenGLWorkarounds, "Packed color formats are buggy on Macs with AMD GPUs", &members, "http://anglebug.com/5469"}; FeatureInfo initFragmentOutputVariables = { - "init_fragment_output_variables", FeatureCategory::OpenGLWorkarounds, + "initFragmentOutputVariables", FeatureCategory::OpenGLWorkarounds, "No init gl_FragColor causes context lost", &members, "http://crbug.com/1171371"}; - FeatureInfo shiftInstancedArrayDataWithExtraOffset = { - "shift_instanced_array_data_with_offset", FeatureCategory::OpenGLWorkarounds, + FeatureInfo shiftInstancedArrayDataWithOffset = { + "shiftInstancedArrayDataWithOffset", FeatureCategory::OpenGLWorkarounds, "glDrawArraysInstanced is buggy on certain new Mac Intel GPUs", &members, "http://crbug.com/1144207"}; FeatureInfo syncVertexArraysToDefault = { - "sync_vertex_arrays_to_default", FeatureCategory::OpenGLWorkarounds, + "syncVertexArraysToDefault", FeatureCategory::OpenGLWorkarounds, "Only use the default VAO because of missing support or driver bugs", &members, "http://anglebug.com/5577"}; - FeatureInfo sanitizeAmdGpuRendererString = { - "sanitize_amdgpu_renderer_string", FeatureCategory::OpenGLWorkarounds, + FeatureInfo sanitizeAMDGPURendererString = { + "sanitizeAMDGPURendererString", FeatureCategory::OpenGLWorkarounds, "Strip precise kernel and DRM version information from amdgpu renderer strings.", &members, "http://crbug.com/1181193"}; - FeatureInfo unbindFBOOnContextSwitch = { - "unbind_fbo_before_switching_context", FeatureCategory::OpenGLWorkarounds, + FeatureInfo unbindFBOBeforeSwitchingContext = { + "unbindFBOBeforeSwitchingContext", FeatureCategory::OpenGLWorkarounds, "Imagination GL drivers are buggy with context switching.", &members, "http://crbug.com/1181193"}; - FeatureInfo flushOnFramebufferChange = {"flush_on_framebuffer_change", + 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 = { - "disable_mutlisampled_render_to_texture", FeatureCategory::OpenGLWorkarounds, + "disableMultisampledRenderToTexture", FeatureCategory::OpenGLWorkarounds, "Many drivers have bugs when using GL_EXT_multisampled_render_to_texture", &members, "http://anglebug.com/2894"}; FeatureInfo uploadTextureDataInChunks = { - "chunked_texture_upload", FeatureCategory::OpenGLWorkarounds, + "uploadTextureDataInChunks", FeatureCategory::OpenGLWorkarounds, "Upload texture data in <120kb chunks to work around Mac driver hangs and crashes.", &members, "http://crbug.com/1181068"}; FeatureInfo emulateImmutableCompressedTexture3D = { - "emulate_immutable_compressed_texture_3d", FeatureCategory::OpenGLWorkarounds, + "emulateImmutableCompressedTexture3D", FeatureCategory::OpenGLWorkarounds, "Use non-immutable texture allocation to work around a driver bug.", &members, "https://crbug.com/1060012"}; - FeatureInfo emulateRGB10 = {"emulate_rgb10", FeatureCategory::OpenGLWorkarounds, + FeatureInfo emulateRGB10 = {"emulateRGB10", FeatureCategory::OpenGLWorkarounds, "Emulate RGB10 support using RGB10_A2.", &members, "https://crbug.com/1300575"}; FeatureInfo alwaysUnbindFramebufferTexture2D = { - "always_unbind_framebuffer_texture_2d", FeatureCategory::OpenGLWorkarounds, + "alwaysUnbindFramebufferTexture2D", FeatureCategory::OpenGLWorkarounds, "Force unbind framebufferTexture2D before binding renderbuffer to work around driver bug.", &members, "https://anglebug.com/5536"}; }; diff --git a/include/platform/FeaturesMtl.h b/include/platform/FeaturesMtl.h index 87cbd2ac45..a37a25657e 100644 --- a/include/platform/FeaturesMtl.h +++ b/include/platform/FeaturesMtl.h @@ -21,77 +21,77 @@ struct FeaturesMtl : FeatureSetBase ~FeaturesMtl(); FeatureInfo hasBaseVertexInstancedDraw = { - "has_base_vertex_instanced_draw", + "hasBaseVertexInstancedDraw", FeatureCategory::MetalFeatures, "The renderer supports base vertex instanced draw", &members, }; FeatureInfo hasExplicitMemBarrier = { - "has_explicit_mem_barrier_mtl", + "hasExplicitMemBarrier", FeatureCategory::MetalFeatures, "The renderer supports explicit memory barrier", &members, }; FeatureInfo hasCheapRenderPass = { - "has_cheap_render_pass_mtl", + "hasCheapRenderPass", FeatureCategory::MetalFeatures, "The renderer can cheaply break a render pass.", &members, }; FeatureInfo hasNonUniformDispatch = { - "has_non_uniform_dispatch", + "hasNonUniformDispatch", FeatureCategory::MetalFeatures, "The renderer supports non uniform compute shader dispatch's group size", &members, }; - FeatureInfo hasStencilOutput = { - "has_shader_stencil_output", + FeatureInfo hasShaderStencilOutput = { + "hasShaderStencilOutput", FeatureCategory::MetalFeatures, "The renderer supports stencil output from fragment shader", &members, }; FeatureInfo hasTextureSwizzle = { - "has_texture_swizzle", + "hasTextureSwizzle", FeatureCategory::MetalFeatures, "The renderer supports texture swizzle", &members, }; FeatureInfo hasDepthAutoResolve = { - "has_msaa_depth_auto_resolve", + "hasDepthAutoResolve", FeatureCategory::MetalFeatures, "The renderer supports MSAA depth auto resolve at the end of render pass", &members, }; FeatureInfo hasStencilAutoResolve = { - "has_msaa_stencil_auto_resolve", + "hasStencilAutoResolve", FeatureCategory::MetalFeatures, "The renderer supports MSAA stencil auto resolve at the end of render pass", &members, }; FeatureInfo hasEvents = { - "has_mtl_events", + "hasEvents", FeatureCategory::MetalFeatures, "The renderer supports MTL(Shared)Event", &members, }; FeatureInfo allowInlineConstVertexData = { - "allow_inline_const_vertex_data", + "allowInlineConstVertexData", FeatureCategory::MetalFeatures, "The renderer supports using inline constant data for small client vertex data", &members, }; - FeatureInfo allowSeparatedDepthStencilBuffers = { - "allow_separate_depth_stencil_buffers", + FeatureInfo allowSeparateDepthStencilBuffers = { + "allowSeparateDepthStencilBuffers", FeatureCategory::MetalFeatures, "Some Apple platforms such as iOS allows separate depth and stencil buffers, " "whereas others such as macOS don't", @@ -99,56 +99,56 @@ struct FeaturesMtl : FeatureSetBase }; FeatureInfo allowRuntimeSamplerCompareMode = { - "allow_runtime_sampler_compare_mode", + "allowRuntimeSamplerCompareMode", FeatureCategory::MetalFeatures, "The renderer supports changing sampler's compare mode outside shaders", &members, }; FeatureInfo allowSamplerCompareGradient = { - "allow_sampler_compare_gradient", + "allowSamplerCompareGradient", FeatureCategory::MetalFeatures, "The renderer supports sample_compare with gradients", &members, }; FeatureInfo allowSamplerCompareLod = { - "allow_sampler_compare_lod", + "allowSamplerCompareLod", FeatureCategory::MetalFeatures, "The renderer supports sample_compare with lod", &members, }; FeatureInfo allowBufferReadWrite = { - "allow_buffer_read_write", + "allowBufferReadWrite", FeatureCategory::MetalFeatures, "The renderer supports buffer read and write in the same shader", &members, }; FeatureInfo allowMultisampleStoreAndResolve = { - "allow_msaa_store_and_resolve", + "allowMultisampleStoreAndResolve", FeatureCategory::MetalFeatures, "The renderer supports MSAA store and resolve in the same pass", &members, }; FeatureInfo allowGenMultipleMipsPerPass = { - "gen_multiple_mips_per_pass", + "allowGenMultipleMipsPerPass", FeatureCategory::MetalFeatures, "The renderer supports generating multiple mipmaps per pass", &members, }; FeatureInfo forceD24S8AsUnsupported = { - "force_d24s8_as_unsupported", + "forceD24S8AsUnsupported", FeatureCategory::MetalFeatures, "Force Depth24Stencil8 format as unsupported.", &members, }; FeatureInfo forceBufferGPUStorage = { - "force_buffer_gpu_storage", + "forceBufferGPUStorage", FeatureCategory::MetalFeatures, "On systems that support both buffer' memory allocation on GPU and shared memory (such as " "macOS), force using GPU memory allocation for buffers everytime or not.", @@ -160,7 +160,7 @@ struct FeaturesMtl : FeatureSetBase "http://anglebug.com/5505"}; FeatureInfo forceNonCSBaseMipmapGeneration = { - "force_non_cs_mipmap_gen", + "forceNonCSBaseMipmapGeneration", FeatureCategory::MetalFeatures, "Turn this feature on to disallow Compute Shader based mipmap generation. Compute Shader " "based mipmap generation might cause GPU hang on some older iOS devices.", @@ -175,14 +175,14 @@ struct FeaturesMtl : FeatureSetBase }; FeatureInfo rewriteRowMajorMatrices = { - "rewrite_row_major_matrices", + "rewriteRowMajorMatrices", FeatureCategory::MetalFeatures, "Rewrite row major matrices in shaders as column major.", &members, }; FeatureInfo intelExplicitBoolCastWorkaround = { - "intel_explicit_bool_cast_workaround", + "intelExplicitBoolCastWorkaround", FeatureCategory::MetalWorkarounds, "Insert explicit casts for float/double/unsigned/signed int on macOS 10.15 with Intel " "driver", @@ -190,19 +190,19 @@ struct FeaturesMtl : FeatureSetBase }; FeatureInfo intelDisableFastMath = { - "intel_disable_fast_math", + "intelDisableFastMath", FeatureCategory::MetalWorkarounds, "Disable fast math in atan and invariance cases when running below macOS 12.0", &members, }; FeatureInfo multisampleColorFormatShaderReadWorkaround = { - "multisample_color_format_shader_read_workaround", FeatureCategory::MetalWorkarounds, + "multisampleColorFormatShaderReadWorkaround", FeatureCategory::MetalWorkarounds, "Add shaderRead usage to some multisampled texture formats", &members, "http://anglebug.com/7049"}; FeatureInfo copyIOSurfaceToNonIOSurfaceForReadOptimization = { - "copy_iosurface_to_non_iosurface_for_read_optimization", 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"}; diff --git a/include/platform/FeaturesVk.h b/include/platform/FeaturesVk.h index 6443b7c049..0c0e930e83 100644 --- a/include/platform/FeaturesVk.h +++ b/include/platform/FeaturesVk.h @@ -50,12 +50,12 @@ struct FeaturesVk : FeatureSetBase }; FeatureInfo clampPointSize = { - "clamp_point_size", FeatureCategory::VulkanWorkarounds, + "clampPointSize", FeatureCategory::VulkanWorkarounds, "The point size range reported from the API is inconsistent with the actual behavior", &members, "http://anglebug.com/2970"}; FeatureInfo depthClamping = { - "depth_clamping", FeatureCategory::VulkanWorkarounds, + "depthClamping", FeatureCategory::VulkanWorkarounds, "The depth value is not clamped to [0,1] for floating point depth buffers.", &members, "http://anglebug.com/3970"}; @@ -336,8 +336,8 @@ struct FeaturesVk : FeatureSetBase "and the performance is better.", &members, "http://anglebug.com/4551"}; - FeatureInfo supportsRenderPassStoreOpNoneQCOM = { - "supportsRenderPassStoreOpNoneQCOM", FeatureCategory::VulkanFeatures, + FeatureInfo supportsRenderPassStoreOpNone = { + "supportsRenderPassStoreOpNone", FeatureCategory::VulkanFeatures, "VkDevice supports VK_QCOM_render_pass_store_ops extension.", &members, "http://anglebug.com/5055"}; @@ -383,35 +383,35 @@ struct FeaturesVk : FeatureSetBase &members, "http://anglebug.com/5061"}; FeatureInfo forceTextureLodOffset1 = { - "force_texture_lod_offset_1", + "forceTextureLodOffset1", FeatureCategory::VulkanWorkarounds, "Increase the minimum texture level-of-detail by 1 when sampling.", &members, }; FeatureInfo forceTextureLodOffset2 = { - "force_texture_lod_offset_2", + "forceTextureLodOffset2", FeatureCategory::VulkanWorkarounds, "Increase the minimum texture level-of-detail by 2 when sampling.", &members, }; FeatureInfo forceTextureLodOffset3 = { - "force_texture_lod_offset_3", + "forceTextureLodOffset3", FeatureCategory::VulkanWorkarounds, "Increase the minimum texture level-of-detail by 3 when sampling.", &members, }; FeatureInfo forceTextureLodOffset4 = { - "force_texture_lod_offset_4", + "forceTextureLodOffset4", FeatureCategory::VulkanWorkarounds, "Increase the minimum texture level-of-detail by 4 when sampling.", &members, }; FeatureInfo forceNearestFiltering = { - "force_nearest_filtering", + "forceNearestFiltering", FeatureCategory::VulkanWorkarounds, "Force nearest filtering when sampling.", &members, @@ -425,7 +425,7 @@ struct FeaturesVk : FeatureSetBase }; FeatureInfo compressVertexData = { - "compress_vertex_data", + "compressVertexData", FeatureCategory::VulkanWorkarounds, "Compress vertex data to smaller data types when " "possible. Using this feature makes ANGLE non-conformant.", @@ -527,8 +527,8 @@ struct FeaturesVk : FeatureSetBase &members, }; - FeatureInfo overrideSurfaceFormatRGB8toRGBA8 = { - "overrideSurfaceFormatRGB8toRGBA8", FeatureCategory::VulkanWorkarounds, + FeatureInfo overrideSurfaceFormatRGB8ToRGBA8 = { + "overrideSurfaceFormatRGB8ToRGBA8", FeatureCategory::VulkanWorkarounds, "Override surface format GL_RGB8 to GL_RGBA8", &members, "http://anglebug.com/6651"}; FeatureInfo supportsSharedPresentableImageExtension = { @@ -585,7 +585,7 @@ struct FeaturesVk : FeatureSetBase "forceSubmitImmutableTextureUpdates", FeatureCategory::VulkanAppWorkarounds, "Force submit updates to immutable textures", &members, "http://anglebug.com/6929"}; - FeatureInfo retainSpirvDebugInfo = {"retainSpirvDebugInfo", FeatureCategory::VulkanFeatures, + FeatureInfo retainSPIRVDebugInfo = {"retainSPIRVDebugInfo", FeatureCategory::VulkanFeatures, "Retain debug info in SPIR-V blob.", &members, "http://anglebug.com/5901"}; diff --git a/include/platform/FrontendFeatures.h b/include/platform/FrontendFeatures.h index fa3168dc4a..6500c9c6b4 100644 --- a/include/platform/FrontendFeatures.h +++ b/include/platform/FrontendFeatures.h @@ -22,45 +22,45 @@ struct FrontendFeatures : FeatureSetBase ~FrontendFeatures(); FeatureInfo loseContextOnOutOfMemory = { - "lose_context_on_out_of_memory", + "loseContextOnOutOfMemory", FeatureCategory::FrontendWorkarounds, "Some users rely on a lost context notification if a GL_OUT_OF_MEMORY error occurs", &members, }; FeatureInfo disableProgramCachingForTransformFeedback = { - "disable_program_caching_for_transform_feedback", + "disableProgramCachingForTransformFeedback", FeatureCategory::FrontendWorkarounds, "On some GPUs, program binaries don't contain transform feedback varyings", &members, }; FeatureInfo scalarizeVecAndMatConstructorArgs = { - "scalarize_vec_and_mat_constructor_args", FeatureCategory::FrontendWorkarounds, + "scalarizeVecAndMatConstructorArgs", FeatureCategory::FrontendWorkarounds, "Always rewrite vec/mat constructors to be consistent", &members, "http://crbug.com/1165751"}; - FeatureInfo disableProgramBinary = {"disable_program_binary", FeatureCategory::FrontendFeatures, + FeatureInfo disableProgramBinary = {"disableProgramBinary", FeatureCategory::FrontendFeatures, "Disable support for GL_OES_get_program_binary", &members, "http://anglebug.com/5007"}; FeatureInfo disableAnisotropicFiltering = { - "disable_anisotropic_filtering", + "disableAnisotropicFiltering", FeatureCategory::FrontendWorkarounds, "Disable support for anisotropic filtering", &members, }; FeatureInfo allowCompressedFormats = { - "allow_compressed_formats", + "allowCompressedFormats", FeatureCategory::FrontendWorkarounds, "Allow compressed formats", &members, }; - FeatureInfo captureLimits = {"enable_capture_limits", 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 enableCompressingPipelineCacheInThreadPool = { "enableCompressingPipelineCacheInThreadPool", FeatureCategory::FrontendWorkarounds, diff --git a/include/platform/d3d_features.json b/include/platform/d3d_features.json index 4204434350..cc62f5ded5 100644 --- a/include/platform/d3d_features.json +++ b/include/platform/d3d_features.json @@ -8,8 +8,7 @@ ], "features": [ { - "name": "mrtPerfWorkaround", - "display_name": "mrt_perf_workaround", + "name": "mrt_perf_workaround", "category": "Workarounds", "description": [ "Some drivers have a bug where they ignore null render targets" @@ -17,8 +16,7 @@ }, { - "name": "setDataFasterThanImageUpload", - "display_name": "set_data_faster_than_image_upload", + "name": "set_data_faster_than_image_upload", "category": "Workarounds", "description": [ "Set data faster than image upload" @@ -26,8 +24,7 @@ }, { - "name": "zeroMaxLodWorkaround", - "display_name": "zero_max_lod", + "name": "zero_max_lod_workaround", "category": "Workarounds", "description": [ "Missing an option to disable mipmaps on a mipmapped texture" @@ -35,8 +32,7 @@ }, { - "name": "useInstancedPointSpriteEmulation", - "display_name": "use_instanced_point_sprite_emulation", + "name": "use_instanced_point_sprite_emulation", "category": "Workarounds", "description": [ "Some D3D11 renderers do not support geometry shaders for pointsprite emulation" @@ -44,8 +40,7 @@ }, { - "name": "depthStencilBlitExtraCopy", - "display_name": "depth_stencil_blit_extra_copy", + "name": "depth_stencil_blit_extra_copy", "category": "Workarounds", "description": [ "Bug in some drivers triggers a TDR when using CopySubresourceRegion from a staging ", @@ -55,8 +50,7 @@ }, { - "name": "expandIntegerPowExpressions", - "display_name": "expand_integer_pow_expressions", + "name": "expand_integer_pow_expressions", "category": "Workarounds", "description": [ "The HLSL optimizer has a bug with optimizing 'pow' in certain integer-valued expressions" @@ -64,8 +58,7 @@ }, { - "name": "flushAfterEndingTransformFeedback", - "display_name": "flush_after_ending_transform_feedback", + "name": "flush_after_ending_transform_feedback", "category": "Workarounds", "description": [ "Some drivers sometimes write out-of-order results to StreamOut buffers when transform ", @@ -74,8 +67,7 @@ }, { - "name": "getDimensionsIgnoresBaseLevel", - "display_name": "get_dimensions_ignores_base_level", + "name": "get_dimensions_ignores_base_level", "category": "Workarounds", "description": [ "Some drivers do not take into account the base level of the ", @@ -84,8 +76,7 @@ }, { - "name": "preAddTexelFetchOffsets", - "display_name": "pre_add_texel_fetch_offsets", + "name": "pre_add_texel_fetch_offsets", "category": "Workarounds", "description": [ "HLSL's function texture.Load returns 0 when the parameter Location is negative, even if ", @@ -94,8 +85,7 @@ }, { - "name": "emulateTinyStencilTextures", - "display_name": "emulate_tiny_stencil_textures", + "name": "emulate_tiny_stencil_textures", "category": "Workarounds", "description": [ "1x1 and 2x2 mips of depth/stencil textures aren't sampled correctly" @@ -103,8 +93,7 @@ }, { - "name": "disableB5G6R5Support", - "display_name": "disable_b5g6r5_support", + "name": "disable_B5G6R5_support", "category": "Workarounds", "description": [ "Textures with the format ", @@ -113,8 +102,7 @@ }, { - "name": "rewriteUnaryMinusOperator", - "display_name": "rewrite_unary_minus_operator", + "name": "rewrite_unary_minus_operator", "category": "Workarounds", "description": [ "Evaluating unary minus operator on integer may get wrong answer in vertex shaders" @@ -122,8 +110,7 @@ }, { - "name": "emulateIsnanFloat", - "display_name": "emulate_isnan_float", + "name": "emulate_isnan_float", "category": "Workarounds", "description": [ "Using isnan() on highp float will get wrong answer" @@ -132,8 +119,7 @@ }, { - "name": "callClearTwice", - "display_name": "call_clear_twice", + "name": "call_clear_twice", "category": "Workarounds", "description": [ "Using clear() may not take effect" @@ -142,8 +128,7 @@ }, { - "name": "useSystemMemoryForConstantBuffers", - "display_name": "use_system_memory_for_constant_buffers", + "name": "use_system_memory_for_constant_buffers", "category": "Workarounds", "description": [ "Copying from staging storage to constant buffer ", @@ -153,8 +138,7 @@ }, { - "name": "selectViewInGeometryShader", - "display_name": "select_view_in_geometry_shader", + "name": "select_view_in_geometry_shader", "category": "Workarounds", "description": [ "The viewport or render target slice will be selected in the geometry shader stage for ", @@ -163,8 +147,7 @@ }, { - "name": "addMockTextureNoRenderTarget", - "display_name": "add_mock_texture_no_render_target", + "name": "add_mock_texture_no_render_target", "category": "Workarounds", "description": [ "On some drivers when rendering with no render target, two bugs lead to incorrect behavior" @@ -173,8 +156,7 @@ }, { - "name": "skipVSConstantRegisterZero", - "display_name": "skip_vs_constant_register_zero", + "name": "skip_VS_constant_register_zero", "category": "Workarounds", "description": [ "In specific cases the driver doesn't handle constant register zero correctly" @@ -182,8 +164,7 @@ }, { - "name": "forceAtomicValueResolution", - "display_name": "force_atomic_value_resolution", + "name": "force_atomic_value_resolution", "category": "Workarounds", "description": [ "On some drivers the return value from RWByteAddressBuffer.InterlockedAdd does not resolve ", @@ -193,8 +174,7 @@ }, { - "name": "allowClearForRobustResourceInit", - "display_name": "allow_clear_for_robust_resource_init", + "name": "allow_clear_for_robust_resource_init", "category": "Workarounds", "description": [ "Some drivers corrupt texture data when clearing for robust resource initialization." @@ -203,8 +183,7 @@ }, { - "name": "allowTranslateUniformBlockToStructuredBuffer", - "display_name": "allow_translate_uniform_block_to_structured_buffer", + "name": "allow_translate_uniform_block_to_structured_buffer", "category": "Workarounds", "description": [ "There is a slow fxc compile performance issue with dynamic uniform indexing if ", @@ -214,8 +193,7 @@ }, { - "name": "allowES3OnFL10_0", - "display_name": "allowES3OnFL10_0", + "name": "allow_ES3_on_FL10_0", "category": "Workarounds", "description": [ "Allow ES3 on 10.0 devices" diff --git a/include/platform/frontend_features.json b/include/platform/frontend_features.json index 5f7ef32fb9..b391a4494a 100644 --- a/include/platform/frontend_features.json +++ b/include/platform/frontend_features.json @@ -9,8 +9,7 @@ ], "features": [ { - "name": "loseContextOnOutOfMemory", - "display_name": "lose_context_on_out_of_memory", + "name": "lose_context_on_out_of_memory", "category": "Workarounds", "description": [ "Some users rely on a lost context notification if a GL_OUT_OF_MEMORY error occurs" @@ -18,8 +17,7 @@ }, { - "name": "disableProgramCachingForTransformFeedback", - "display_name": "disable_program_caching_for_transform_feedback", + "name": "disable_program_caching_for_transform_feedback", "category": "Workarounds", "description": [ "On some GPUs, program binaries don't contain transform feedback varyings" @@ -27,8 +25,7 @@ }, { - "name": "scalarizeVecAndMatConstructorArgs", - "display_name": "scalarize_vec_and_mat_constructor_args", + "name": "scalarize_vec_and_mat_constructor_args", "category": "Workarounds", "description": [ "Always rewrite vec/mat constructors to be consistent" @@ -37,8 +34,7 @@ }, { - "name": "disableProgramBinary", - "display_name": "disable_program_binary", + "name": "disable_program_binary", "category": "Features", "description": [ "Disable support for GL_OES_get_program_binary" @@ -47,8 +43,7 @@ }, { - "name": "disableAnisotropicFiltering", - "display_name": "disable_anisotropic_filtering", + "name": "disable_anisotropic_filtering", "category": "Workarounds", "description": [ "Disable support for anisotropic filtering" @@ -56,8 +51,7 @@ }, { - "name": "allowCompressedFormats", - "display_name": "allow_compressed_formats", + "name": "allow_compressed_formats", "category": "Workarounds", "description": [ "Allow compressed formats" @@ -65,8 +59,7 @@ }, { - "name": "captureLimits", - "display_name": "enable_capture_limits", + "name": "enable_capture_limits", "category": "Features", "description": [ "Set the context limits like frame capturing was enabled" @@ -75,8 +68,7 @@ }, { - "name": "enableCompressingPipelineCacheInThreadPool", - "display_name": "enableCompressingPipelineCacheInThreadPool", + "name": "enable_compressing_pipeline_cache_in_thread_pool", "category": "Workarounds", "description": [ "Enable compressing pipeline cache in thread pool." @@ -85,8 +77,7 @@ }, { - "name": "forceRobustResourceInit", - "display_name": "forceRobustResourceInit", + "name": "force_robust_resource_init", "category": "Features", "description": [ "Force-enable robust resource init" @@ -95,8 +86,7 @@ }, { - "name": "forceInitShaderVariables", - "display_name": "forceInitShaderVariables", + "name": "force_init_shader_variables", "category": "Features", "description": [ "Force-enable shader variable initialization" @@ -104,8 +94,7 @@ }, { - "name": "enableProgramBinaryForCapture", - "display_name": "enableProgramBinaryForCapture", + "name": "enable_program_binary_for_capture", "category": "Features", "description": [ "Even if FrameCapture is enabled, enable GL_OES_get_program_binary" diff --git a/include/platform/gen_features.py b/include/platform/gen_features.py index 74d30c8306..4156c73e2a 100755 --- a/include/platform/gen_features.py +++ b/include/platform/gen_features.py @@ -11,6 +11,7 @@ from collections import namedtuple import json import os +import re import sys feature_files = { @@ -52,7 +53,7 @@ inline {name}::~{name}() = default; #endif // ANGLE_PLATFORM_{NAME}_H_ """ -template_feature = u"""FeatureInfo {name} = {{ +template_feature = u"""FeatureInfo {var_name} = {{ "{display_name}", FeatureCategory::{category}, {description}, &members, {issue} @@ -90,7 +91,7 @@ ANGLE_UTIL_EXPORT extern const char *GetFeatureName(Feature feature); #endif // ANGLE_SRC_TESTS_TEST_UTILS_ANGLE_FEATURES_AUTOGEN_H_ """ -template_feature_enum = u"""{Name},""" +template_feature_enum = u"""{VarName},""" template_feature_list_source = u"""// GENERATED FILE - DO NOT EDIT. // Generated by {script_name} using data from {input_file_name}. @@ -122,7 +123,11 @@ const char *GetFeatureName(Feature feature) }} // namespace angle """ -template_feature_string = u"""{{Feature::{Name}, "{display_name}"}},""" +template_feature_string = u"""{{Feature::{VarName}, "{display_name}"}},""" + + +def make_camel_case(json_name): + return re.sub('_(.)', lambda m: m.group(1).upper(), json_name) def main(): @@ -145,11 +150,13 @@ def main(): # Go over the list of features and write the header file that declares the features struct for feature_json in features_json: - name = feature_json['name'] - display_name = feature_json['display_name'] + json_name = feature_json['name'] + var_name = make_camel_case(json_name) + # Use the same (camelCase) name for display as well + display_name = var_name issue = feature_json.get('issue', None) feature = template_feature.format( - name=name, + var_name=var_name, display_name=display_name, category=category_prefix + feature_json['category'], description='\n'.join('"' + line + '"' for line in feature_json['description']), @@ -158,12 +165,8 @@ def main(): features.append(feature) # Keep track of the feature names. Sometimes the same feature name is present in - # multiple backends. That's ok for the purposes of feature overriding as long as the - # display names match. - if name in name_map: - assert (display_name == name_map[name]) - else: - name_map[name] = display_name + # 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']]) name = header_file[:-2] @@ -183,13 +186,13 @@ def main(): # Generate helpers for use by tests to override a feature or not. feature_enums = [] feature_strings = [] - for name, display_name in sorted(name_map.items()): - Name = name[0].upper() + name[1:] + for var_name, display_name in sorted(name_map.items(), key=lambda item: item[0].lower()): + VarName = var_name[0].upper() + var_name[1:] - feature_enums.append(template_feature_enum.format(Name=Name)) + feature_enums.append(template_feature_enum.format(VarName=VarName)) feature_strings.append( - template_feature_string.format(Name=Name, display_name=display_name)) + template_feature_string.format(VarName=VarName, display_name=display_name)) with open(feature_list_header_file, 'w') as fout: fout.write( diff --git a/include/platform/gl_features.json b/include/platform/gl_features.json index 6f798b565a..0f319612fb 100644 --- a/include/platform/gl_features.json +++ b/include/platform/gl_features.json @@ -8,8 +8,7 @@ ], "features": [ { - "name": "avoid1BitAlphaTextureFormats", - "display_name": "avoid_1_bit_alpha_texture_formats", + "name": "avoid_1_bit_alpha_texture_formats", "category": "Workarounds", "description": [ "Issue with 1-bit alpha framebuffer formats" @@ -17,8 +16,7 @@ }, { - "name": "rgba4IsNotSupportedForColorRendering", - "display_name": "rgba4_is_not_supported_for_color_rendering", + "name": "RGBA4_is_not_supported_for_color_rendering", "category": "Workarounds", "description": [ "GL_RGBA4 is not color renderable" @@ -26,8 +24,7 @@ }, { - "name": "allowEtcFormats", - "display_name": "allow_etc_formats", + "name": "allow_ETC_formats", "category": "Workarounds", "description": [ "Enable ETC2/EAC on desktop OpenGL" @@ -35,8 +32,7 @@ }, { - "name": "doesSRGBClearsOnLinearFramebufferAttachments", - "display_name": "does_srgb_clears_on_linear_framebuffer_attachments", + "name": "does_SRGB_clears_on_linear_framebuffer_attachments", "category": "Workarounds", "description": [ "Issue clearing framebuffers with linear attachments when GL_FRAMEBUFFER_SRGB is enabled" @@ -44,8 +40,7 @@ }, { - "name": "doWhileGLSLCausesGPUHang", - "display_name": "do_while_glsl_causes_gpu_hang", + "name": "do_while_GLSL_causes_GPU_hang", "category": "Workarounds", "description": [ "Some GLSL constructs involving do-while loops cause GPU hangs" @@ -54,8 +49,7 @@ }, { - "name": "addBaseVertexToVertexID", - "display_name": "vertex_id_does_not_include_base_vertex", + "name": "vertex_ID_does_not_include_base_vertex", "category": "Workarounds", "description": [ "gl_VertexID in GLSL vertex shader doesn't include base vertex value" @@ -63,8 +57,7 @@ }, { - "name": "finishDoesNotCauseQueriesToBeAvailable", - "display_name": "finish_does_not_cause_queries_to_be_available", + "name": "finish_does_not_cause_queries_to_be_available", "category": "Workarounds", "description": [ "glFinish doesn't cause all queries to report available result" @@ -72,8 +65,7 @@ }, { - "name": "alwaysCallUseProgramAfterLink", - "display_name": "always_call_use_program_after_link", + "name": "always_call_use_program_after_link", "category": "Workarounds", "description": [ "Always call useProgram after a successful link to avoid a driver bug" @@ -82,8 +74,7 @@ }, { - "name": "unpackOverlappingRowsSeparatelyUnpackBuffer", - "display_name": "unpack_overlapping_rows_separately_unpack_buffer", + "name": "unpack_overlapping_rows_separately_unpack_buffer", "category": "Workarounds", "description": [ "In the case of unpacking from a pixel unpack buffer, unpack overlapping rows row by row" @@ -91,8 +82,7 @@ }, { - "name": "packOverlappingRowsSeparatelyPackBuffer", - "display_name": "pack_overlapping_rows_separately_pack_buffer", + "name": "pack_overlapping_rows_separately_pack_buffer", "category": "Workarounds", "description": [ "In the case of packing to a pixel pack buffer, pack overlapping rows row by row" @@ -100,8 +90,7 @@ }, { - "name": "initializeCurrentVertexAttributes", - "display_name": "initialize_current_vertex_attributes", + "name": "initialize_current_vertex_attributes", "category": "Workarounds", "description": [ "During initialization, assign the current vertex attributes to the spec-mandated defaults" @@ -109,8 +98,7 @@ }, { - "name": "emulateAbsIntFunction", - "display_name": "emulate_abs_int_function", + "name": "emulate_abs_int_function", "category": "Workarounds", "description": [ "abs(i) where i is an integer returns unexpected result" @@ -119,8 +107,7 @@ }, { - "name": "addAndTrueToLoopCondition", - "display_name": "add_and_true_to_loop_condition", + "name": "add_and_true_to_loop_condition", "category": "Workarounds", "description": [ "Calculation of loop conditions in for and while loop has bug" @@ -128,8 +115,7 @@ }, { - "name": "unpackLastRowSeparatelyForPaddingInclusion", - "display_name": "unpack_last_row_separately_for_padding_inclusion", + "name": "unpack_last_row_separately_for_padding_inclusion", "category": "Workarounds", "description": [ "When uploading textures from an unpack buffer, some drivers count an extra row padding" @@ -138,8 +124,7 @@ }, { - "name": "packLastRowSeparatelyForPaddingInclusion", - "display_name": "pack_last_row_separately_for_padding_inclusion", + "name": "pack_last_row_separately_for_padding_inclusion", "category": "Workarounds", "description": [ "When uploading textures from an pack buffer, some drivers count an extra row padding" @@ -148,8 +133,7 @@ }, { - "name": "emulateIsnanFloat", - "display_name": "emulate_isnan_float", + "name": "emulate_isnan_float", "category": "Workarounds", "description": [ "Using isnan() on highp float will get wrong answer" @@ -158,8 +142,7 @@ }, { - "name": "useUnusedBlocksWithStandardOrSharedLayout", - "display_name": "use_unused_blocks_with_standard_or_shared_layout", + "name": "use_unused_blocks_with_standard_or_shared_layout", "category": "Workarounds", "description": [ "Unused std140 or shared uniform blocks will be treated as inactive" @@ -167,8 +150,7 @@ }, { - "name": "removeInvariantAndCentroidForESSL3", - "display_name": "remove_invarient_and_centroid_for_essl3", + "name": "remove_invariant_and_centroid_for_ESSL3", "category": "Workarounds", "description": [ "Fix spec difference between GLSL 4.1 or lower and ESSL3" @@ -176,8 +158,7 @@ }, { - "name": "rewriteFloatUnaryMinusOperator", - "display_name": "rewrite_float_unary_minus_operator", + "name": "rewrite_float_unary_minus_operator", "category": "Workarounds", "description": [ "Using '-<float>' will get wrong answer" @@ -186,8 +167,7 @@ }, { - "name": "emulateAtan2Float", - "display_name": "emulate_atan_2_float", + "name": "emulate_atan_2_float", "category": "Workarounds", "description": [ "atan(y, x) may return a wrong answer" @@ -196,8 +176,7 @@ }, { - "name": "reapplyUBOBindingsAfterUsingBinaryProgram", - "display_name": "reapply_ubo_bindings_after_using_binary_program", + "name": "reapply_UBO_bindings_after_using_binary_program", "category": "Workarounds", "description": [ "Some drivers forget about UBO bindings when using program binaries" @@ -206,8 +185,7 @@ }, { - "name": "emulateMaxVertexAttribStride", - "display_name": "emulate_max_vertex_attrib_stride", + "name": "emulate_max_vertex_attrib_stride", "category": "Workarounds", "description": [ "Some drivers return 0 when MAX_VERTEX_ATTRIB_STRIED queried" @@ -216,8 +194,7 @@ }, { - "name": "dontInitializeUninitializedLocals", - "display_name": "dont_initialize_uninitialized_locals", + "name": "dont_initialize_uninitialized_locals", "category": "Workarounds", "description": [ "Initializing uninitialized locals caused odd behavior in a few WebGL 2 tests" @@ -226,8 +203,7 @@ }, { - "name": "clampPointSize", - "display_name": "clamp_point_size", + "name": "clamp_point_size", "category": "Workarounds", "description": [ "The point size range reported from the API is inconsistent with the actual behavior" @@ -235,8 +211,7 @@ }, { - "name": "dontUseLoopsToInitializeVariables", - "display_name": "dont_use_loops_to_initialize_variables", + "name": "dont_use_loops_to_initialize_variables", "category": "Workarounds", "description": [ "For loops used to initialize variables hit native GLSL compiler bugs" @@ -245,8 +220,7 @@ }, { - "name": "clampFragDepth", - "display_name": "clamp_frag_depth", + "name": "clamp_frag_depth", "category": "Workarounds", "description": [ "gl_FragDepth is not clamped correctly when rendering to a floating point depth buffer" @@ -254,8 +228,7 @@ }, { - "name": "rewriteRepeatedAssignToSwizzled", - "display_name": "rewrite_repeated_assign_to_swizzled", + "name": "rewrite_repeated_assign_to_swizzled", "category": "Workarounds", "description": [ "Repeated assignment to swizzled values inside a ", @@ -264,8 +237,7 @@ }, { - "name": "disableBlendFuncExtended", - "display_name": "disable_blend_func_extended", + "name": "disable_blend_func_extended", "category": "Workarounds", "description": [ "ARB_blend_func_extended does not pass the tests" @@ -274,8 +246,7 @@ }, { - "name": "unsizedsRGBReadPixelsDoesntTransform", - "display_name": "unsized_srgb_read_pixels_doesnt_transform", + "name": "unsized_SRGB_read_pixels_doesnt_transform", "category": "Workarounds", "description": [ "Drivers returning raw sRGB values instead of linearized values when calling glReadPixels ", @@ -285,8 +256,7 @@ }, { - "name": "queryCounterBitsGeneratesErrors", - "display_name": "query_counter_bits_generates_errors", + "name": "query_counter_bits_generates_errors", "category": "Workarounds", "description": [ "Drivers generate errors when querying the number of bits in timer queries" @@ -295,8 +265,7 @@ }, { - "name": "dontRelinkProgramsInParallel", - "display_name": "dont_relink_programs_in_parallel", + "name": "dont_relink_programs_in_parallel", "category": "Workarounds", "description": [ "Relinking a program in parallel is buggy" @@ -305,8 +274,7 @@ }, { - "name": "disableWorkerContexts", - "display_name": "disable_worker_contexts", + "name": "disable_worker_contexts", "category": "Workarounds", "description": [ "Some tests have been seen to fail using worker contexts" @@ -315,8 +283,7 @@ }, { - "name": "limitMaxTextureSizeTo4096", - "display_name": "max_texture_size_limit_4096", + "name": "limit_max_texture_size_to_4096", "category": "Workarounds", "description": [ "Limit max texture size to 4096 to avoid frequent ", @@ -326,8 +293,7 @@ }, { - "name": "limitMaxMSAASamplesTo4", - "display_name": "max_msaa_sample_count_4", + "name": "limit_max_MSAA_samples_to_4", "category": "Workarounds", "description": [ "Various rendering bugs have been observed when using higher MSAA counts" @@ -336,8 +302,7 @@ }, { - "name": "allowClearForRobustResourceInit", - "display_name": "allow_clear_for_robust_resource_init", + "name": "allow_clear_for_robust_resource_init", "category": "Workarounds", "description": [ "Using glClear for robust resource initialization is buggy on some drivers and leads to ", @@ -347,8 +312,7 @@ }, { - "name": "clampArrayAccess", - "display_name": "clamp_array_access", + "name": "clamp_array_access", "category": "Workarounds", "description": [ "Clamp uniform array access to avoid reading invalid memory." @@ -357,8 +321,7 @@ }, { - "name": "resetTexImage2DBaseLevel", - "display_name": "reset_teximage2d_base_level", + "name": "reset_TexImage2D_base_level", "category": "Workarounds", "description": [ "Reset texture base level before calling glTexImage2D to ", @@ -368,8 +331,7 @@ }, { - "name": "clearToZeroOrOneBroken", - "display_name": "clear_to_zero_or_one_broken", + "name": "clear_to_zero_or_one_broken", "category": "Workarounds", "description": [ "Clears when the clear color is all zeros or ones do not work." @@ -378,8 +340,7 @@ }, { - "name": "limitMax3dArrayTextureSizeTo1024", - "display_name": "max_3d_array_texture_size_1024", + "name": "limit_max_3d_array_texture_size_to_1024", "category": "Workarounds", "description": [ "Limit max 3d texture size and max array texture layers to 1024 to avoid system hang" @@ -388,8 +349,7 @@ }, { - "name": "adjustSrcDstRegionBlitFramebuffer", - "display_name": "adjust_src_dst_region_for_blitframebuffer", + "name": "adjust_src_dst_region_for_BlitFramebuffer", "category": "Workarounds", "description": [ "Many platforms have issues with blitFramebuffer when the parameters are large." @@ -398,8 +358,7 @@ }, { - "name": "clipSrcRegionBlitFramebuffer", - "display_name": "clip_src_region_for_blitframebuffer", + "name": "clip_src_region_for_BlitFramebuffer", "category": "Workarounds", "description": [ "Issues with blitFramebuffer when the parameters don't match the framebuffer size." @@ -408,8 +367,7 @@ }, { - "name": "rgbDXT1TexturesSampleZeroAlpha", - "display_name": "rgb_dxt1_textures_sample_zero_alpha", + "name": "RGB_DXT1_textures_sample_zero_alpha", "category": "Workarounds", "description": [ "Sampling BLACK texels from RGB DXT1 textures returns transparent black on Mac." @@ -418,8 +376,7 @@ }, { - "name": "unfoldShortCircuits", - "display_name": "unfold_short_circuits", + "name": "unfold_short_circuits", "category": "Workarounds", "description": [ "Mac incorrectly executes both sides of && and || expressions when they should ", @@ -429,8 +386,7 @@ }, { - "name": "emulatePrimitiveRestartFixedIndex", - "display_name": "emulate_primitive_restart_fixed_index", + "name": "emulate_primitive_restart_fixed_index", "category": "Workarounds", "description": [ "When GL_PRIMITIVE_RESTART_FIXED_INDEX is not available, emulate it with ", @@ -440,8 +396,7 @@ }, { - "name": "setPrimitiveRestartFixedIndexForDrawArrays", - "display_name": "set_primitive_restart_fixed_index_for_draw_arrays", + "name": "set_primitive_restart_fixed_index_for_draw_arrays", "category": "Workarounds", "description": [ "Some drivers discard vertex data in DrawArrays calls when the fixed primitive restart ", @@ -451,8 +406,7 @@ }, { - "name": "removeDynamicIndexingOfSwizzledVector", - "display_name": "remove_dynamic_indexing_of_swizzled_vector", + "name": "remove_dynamic_indexing_of_swizzled_vector", "category": "Workarounds", "description": [ "Dynamic indexing of swizzled l-values doesn't work correctly on various platforms." @@ -461,8 +415,7 @@ }, { - "name": "preAddTexelFetchOffsets", - "display_name": "pre_add_texel_fetch_offsets", + "name": "pre_add_texel_fetch_offsets", "category": "Workarounds", "description": [ "Intel Mac drivers mistakenly consider the parameter position of nagative vaule as invalid ", @@ -474,8 +427,7 @@ }, { - "name": "regenerateStructNames", - "display_name": "regenerate_struct_names", + "name": "regenerate_struct_names", "category": "Workarounds", "description": [ "All Mac drivers do not handle struct scopes correctly. This workaround overwrites a struct", @@ -485,8 +437,7 @@ }, { - "name": "readPixelsUsingImplementationColorReadFormatForNorm16", - "display_name": "read_pixels_using_implementation_color_read_format", + "name": "read_pixels_using_implementation_color_read_format_for_norm16", "category": "Workarounds", "description": [ "Quite some OpenGL ES drivers don't implement readPixels for RGBA/UNSIGNED_SHORT from ", @@ -496,8 +447,7 @@ }, { - "name": "flushBeforeDeleteTextureIfCopiedTo", - "display_name": "flush_before_delete_texture_if_copied_to", + "name": "flush_before_delete_texture_if_copied_to", "category": "Workarounds", "description": [ "Some drivers track CopyTex{Sub}Image texture dependencies incorrectly. Flush", @@ -507,8 +457,7 @@ }, { - "name": "rewriteRowMajorMatrices", - "display_name": "rewrite_row_major_matrices", + "name": "rewrite_row_major_matrices", "category": "Workarounds", "description": [ "Rewrite row major matrices in shaders as column major as a driver bug workaround" @@ -517,8 +466,7 @@ }, { - "name": "disableDrawBuffersIndexed", - "display_name": "disable_draw_buffers_indexed", + "name": "disable_draw_buffers_indexed", "category": "Workarounds", "description": [ "Disable OES_draw_buffers_indexed extension." @@ -526,8 +474,7 @@ }, { - "name": "disableSemaphoreFd", - "display_name": "disable_semaphore_fd", + "name": "disable_semaphore_fd", "category": "Workarounds", "description": [ "Disable GL_EXT_semaphore_fd extension" @@ -536,8 +483,7 @@ }, { - "name": "disableTimestampQueries", - "display_name": "disable_timestamp_queries", + "name": "disable_timestamp_queries", "category": "Workarounds", "description": [ "Disable GL_EXT_disjoint_timer_query extension" @@ -546,8 +492,7 @@ }, { - "name": "encodeAndDecodeSRGBForGenerateMipmap", - "display_name": "decode_encode_srgb_for_generatemipmap", + "name": "decode_encode_SRGB_for_GenerateMipmap", "category": "Workarounds", "description": [ "Decode and encode before generateMipmap for srgb format textures." @@ -556,8 +501,7 @@ }, { - "name": "emulateCopyTexImage2DFromRenderbuffers", - "display_name": "emulate_copyteximage2d_from_renderbuffers", + "name": "emulate_CopyTexImage2D_from_renderbuffers", "category": "Workarounds", "description": [ "CopyTexImage2D spuriously returns errors on iOS when copying from renderbuffers." @@ -566,8 +510,7 @@ }, { - "name": "disableGPUSwitchingSupport", - "display_name": "disable_gpu_switching_support", + "name": "disable_GPU_switching_support", "category": "Workarounds", "description": [ "Disable GPU switching support (use only the low-power GPU) on older MacBook Pros." @@ -576,8 +519,7 @@ }, { - "name": "disableNativeParallelCompile", - "display_name": "disable_native_parallel_compile", + "name": "disable_native_parallel_compile", "category": "Workarounds", "description": [ "Do not use native KHR_parallel_shader_compile even when available." @@ -586,8 +528,7 @@ }, { - "name": "emulatePackSkipRowsAndPackSkipPixels", - "display_name": "emulate_pack_skip_rows_and_pack_skip_pixels", + "name": "emulate_pack_skip_rows_and_pack_skip_pixels", "category": "Workarounds", "description": [ "GL_PACK_SKIP_ROWS and GL_PACK_SKIP_PIXELS are ignored in Apple's OpenGL driver." @@ -596,8 +537,7 @@ }, { - "name": "clampMscRate", - "display_name": "clamp_msc_rate", + "name": "clamp_msc_rate", "category": "Workarounds", "description": [ "Some drivers return bogus values for GetMscRate, so we clamp it to 30Hz" @@ -606,8 +546,7 @@ }, { - "name": "bindTransformFeedbackBufferBeforeBindBufferRange", - "display_name": "bind_transform_feedback_buffer_before_bind_buffer_range", + "name": "bind_transform_feedback_buffer_before_bind_buffer_range", "category": "Workarounds", "description": [ "Bind transform feedback buffers to the generic binding point before calling ", @@ -617,8 +556,7 @@ }, { - "name": "disableSyncControlSupport", - "display_name": "disable_sync_control_support", + "name": "disable_sync_control_support", "category": "Workarounds", "description": [ "Speculative fix for issues on Linux/Wayland where exposing GLX_OML_sync_control renders ", @@ -628,8 +566,7 @@ }, { - "name": "keepBufferShadowCopy", - "display_name": "keep_buffer_shadow_copy", + "name": "keep_buffer_shadow_copy", "category": "Workarounds", "description": [ "Maintain a shadow copy of buffer data when the GL API does not permit reading data back." @@ -637,8 +574,7 @@ }, { - "name": "setZeroLevelBeforeGenerateMipmap", - "display_name": "set_zero_level_before_generating_mipmap", + "name": "set_zero_level_before_GenerateMipmap", "category": "Workarounds", "description": [ "glGenerateMipmap fails if the zero texture level is not set on some Mac drivers." @@ -646,8 +582,7 @@ }, { - "name": "promotePackedFormatsTo8BitPerChannel", - "display_name": "promote_packed_formats_to_8_bit_per_channel", + "name": "promote_packed_formats_to_8_bit_per_channel", "category": "Workarounds", "description": [ "Packed color formats are buggy on Macs with AMD GPUs" @@ -656,8 +591,7 @@ }, { - "name": "initFragmentOutputVariables", - "display_name": "init_fragment_output_variables", + "name": "init_fragment_output_variables", "category": "Workarounds", "description": [ "No init gl_FragColor causes context lost" @@ -666,8 +600,7 @@ }, { - "name": "shiftInstancedArrayDataWithExtraOffset", - "display_name": "shift_instanced_array_data_with_offset", + "name": "shift_instanced_array_data_with_offset", "category": "Workarounds", "description": [ "glDrawArraysInstanced is buggy on certain new Mac Intel GPUs" @@ -676,8 +609,7 @@ }, { - "name": "syncVertexArraysToDefault", - "display_name": "sync_vertex_arrays_to_default", + "name": "sync_vertex_arrays_to_default", "category": "Workarounds", "description": [ "Only use the default VAO because of missing support or driver bugs" @@ -686,8 +618,7 @@ }, { - "name": "sanitizeAmdGpuRendererString", - "display_name": "sanitize_amdgpu_renderer_string", + "name": "sanitize_AMDGPU_renderer_string", "category": "Workarounds", "description": [ "Strip precise kernel and DRM version information from amdgpu renderer strings." @@ -696,8 +627,7 @@ }, { - "name": "unbindFBOOnContextSwitch", - "display_name": "unbind_fbo_before_switching_context", + "name": "unbind_FBO_before_switching_context", "category": "Workarounds", "description": [ "Imagination GL drivers are buggy with context switching." @@ -706,8 +636,7 @@ }, { - "name": "flushOnFramebufferChange", - "display_name": "flush_on_framebuffer_change", + "name": "flush_on_framebuffer_change", "category": "Workarounds", "description": [ "Switching framebuffers without a flush can lead to ", @@ -717,8 +646,7 @@ }, { - "name": "disableMultisampledRenderToTexture", - "display_name": "disable_mutlisampled_render_to_texture", + "name": "disable_multisampled_render_to_texture", "category": "Workarounds", "description": [ "Many drivers have bugs when using GL_EXT_multisampled_render_to_texture" @@ -727,8 +655,7 @@ }, { - "name": "uploadTextureDataInChunks", - "display_name": "chunked_texture_upload", + "name": "upload_texture_data_in_chunks", "category": "Workarounds", "description": [ "Upload texture data in <120kb chunks to work around Mac driver hangs and crashes." @@ -737,8 +664,7 @@ }, { - "name": "emulateImmutableCompressedTexture3D", - "display_name": "emulate_immutable_compressed_texture_3d", + "name": "emulate_immutable_compressed_texture_3D", "category": "Workarounds", "description": [ "Use non-immutable texture allocation to work around a driver bug." @@ -747,8 +673,7 @@ }, { - "name": "emulateRGB10", - "display_name": "emulate_rgb10", + "name": "emulate_RGB10", "category": "Workarounds", "description": [ "Emulate RGB10 support using RGB10_A2." @@ -757,8 +682,7 @@ }, { - "name": "alwaysUnbindFramebufferTexture2D", - "display_name": "always_unbind_framebuffer_texture_2d", + "name": "always_unbind_framebuffer_texture_2D", "category": "Workarounds", "description": [ "Force unbind framebufferTexture2D before binding renderbuffer to work around driver bug." diff --git a/include/platform/mtl_features.json b/include/platform/mtl_features.json index 2f2ae3ffe2..1e95bda13d 100644 --- a/include/platform/mtl_features.json +++ b/include/platform/mtl_features.json @@ -8,8 +8,7 @@ ], "features": [ { - "name": "hasBaseVertexInstancedDraw", - "display_name": "has_base_vertex_instanced_draw", + "name": "has_base_vertex_instanced_draw", "category": "Features", "description": [ "The renderer supports base vertex instanced draw" @@ -17,8 +16,7 @@ }, { - "name": "hasExplicitMemBarrier", - "display_name": "has_explicit_mem_barrier_mtl", + "name": "has_explicit_mem_barrier", "category": "Features", "description": [ "The renderer supports explicit memory barrier" @@ -26,8 +24,7 @@ }, { - "name": "hasCheapRenderPass", - "display_name": "has_cheap_render_pass_mtl", + "name": "has_cheap_render_pass", "category": "Features", "description": [ "The renderer can cheaply break a render pass." @@ -35,8 +32,7 @@ }, { - "name": "hasNonUniformDispatch", - "display_name": "has_non_uniform_dispatch", + "name": "has_non_uniform_dispatch", "category": "Features", "description": [ "The renderer supports non uniform compute shader dispatch's group size" @@ -44,8 +40,7 @@ }, { - "name": "hasStencilOutput", - "display_name": "has_shader_stencil_output", + "name": "has_shader_stencil_output", "category": "Features", "description": [ "The renderer supports stencil output from fragment shader" @@ -53,8 +48,7 @@ }, { - "name": "hasTextureSwizzle", - "display_name": "has_texture_swizzle", + "name": "has_texture_swizzle", "category": "Features", "description": [ "The renderer supports texture swizzle" @@ -62,8 +56,7 @@ }, { - "name": "hasDepthAutoResolve", - "display_name": "has_msaa_depth_auto_resolve", + "name": "has_depth_auto_resolve", "category": "Features", "description": [ "The renderer supports MSAA depth auto resolve at the end of render pass" @@ -71,8 +64,7 @@ }, { - "name": "hasStencilAutoResolve", - "display_name": "has_msaa_stencil_auto_resolve", + "name": "has_stencil_auto_resolve", "category": "Features", "description": [ "The renderer supports MSAA stencil auto resolve at the end of render pass" @@ -80,8 +72,7 @@ }, { - "name": "hasEvents", - "display_name": "has_mtl_events", + "name": "has_events", "category": "Features", "description": [ "The renderer supports MTL(Shared)Event" @@ -89,8 +80,7 @@ }, { - "name": "allowInlineConstVertexData", - "display_name": "allow_inline_const_vertex_data", + "name": "allow_inline_const_vertex_data", "category": "Features", "description": [ "The renderer supports using inline constant data for small client vertex data" @@ -98,8 +88,7 @@ }, { - "name": "allowSeparatedDepthStencilBuffers", - "display_name": "allow_separate_depth_stencil_buffers", + "name": "allow_separate_depth_stencil_buffers", "category": "Features", "description": [ "Some Apple platforms such as iOS allows separate depth and stencil buffers, ", @@ -108,8 +97,7 @@ }, { - "name": "allowRuntimeSamplerCompareMode", - "display_name": "allow_runtime_sampler_compare_mode", + "name": "allow_runtime_sampler_compare_mode", "category": "Features", "description": [ "The renderer supports changing sampler's compare mode outside shaders" @@ -117,8 +105,7 @@ }, { - "name": "allowSamplerCompareGradient", - "display_name": "allow_sampler_compare_gradient", + "name": "allow_sampler_compare_gradient", "category": "Features", "description": [ "The renderer supports sample_compare with gradients" @@ -126,8 +113,7 @@ }, { - "name": "allowSamplerCompareLod", - "display_name": "allow_sampler_compare_lod", + "name": "allow_sampler_compare_lod", "category": "Features", "description": [ "The renderer supports sample_compare with lod" @@ -135,8 +121,7 @@ }, { - "name": "allowBufferReadWrite", - "display_name": "allow_buffer_read_write", + "name": "allow_buffer_read_write", "category": "Features", "description": [ "The renderer supports buffer read and write in the same shader" @@ -144,8 +129,7 @@ }, { - "name": "allowMultisampleStoreAndResolve", - "display_name": "allow_msaa_store_and_resolve", + "name": "allow_multisample_store_and_resolve", "category": "Features", "description": [ "The renderer supports MSAA store and resolve in the same pass" @@ -153,8 +137,7 @@ }, { - "name": "allowGenMultipleMipsPerPass", - "display_name": "gen_multiple_mips_per_pass", + "name": "allow_gen_multiple_mips_per_pass", "category": "Features", "description": [ "The renderer supports generating multiple mipmaps per pass" @@ -162,8 +145,7 @@ }, { - "name": "forceD24S8AsUnsupported", - "display_name": "force_d24s8_as_unsupported", + "name": "force_D24S8_as_unsupported", "category": "Features", "description": [ "Force Depth24Stencil8 format as unsupported." @@ -171,8 +153,7 @@ }, { - "name": "forceBufferGPUStorage", - "display_name": "force_buffer_gpu_storage", + "name": "force_buffer_GPU_storage", "category": "Features", "description": [ "On systems that support both buffer' memory allocation on GPU and shared memory (such as ", @@ -181,8 +162,7 @@ }, { - "name": "directMetalGeneration", - "display_name": "directMetalGeneration", + "name": "direct_metal_generation", "category": "Features", "description": [ "Direct translation to Metal." @@ -191,8 +171,7 @@ }, { - "name": "forceNonCSBaseMipmapGeneration", - "display_name": "force_non_cs_mipmap_gen", + "name": "force_non_CS_base_mipmap_generation", "category": "Features", "description": [ "Turn this feature on to disallow Compute Shader based mipmap generation. Compute Shader ", @@ -201,8 +180,7 @@ }, { - "name": "emulateTransformFeedback", - "display_name": "emulateTransformFeedback", + "name": "emulate_transform_feedback", "category": "Features", "description": [ "Turn this on to allow transform feedback in Metal using a 2-pass VS for GLES3." @@ -210,8 +188,7 @@ }, { - "name": "rewriteRowMajorMatrices", - "display_name": "rewrite_row_major_matrices", + "name": "rewrite_row_major_matrices", "category": "Features", "description": [ "Rewrite row major matrices in shaders as column major." @@ -219,8 +196,7 @@ }, { - "name": "intelExplicitBoolCastWorkaround", - "display_name": "intel_explicit_bool_cast_workaround", + "name": "intel_explicit_bool_cast_workaround", "category": "Workarounds", "description": [ "Insert explicit casts for float/double/unsigned/signed int on macOS 10.15 with Intel ", @@ -229,8 +205,7 @@ }, { - "name": "intelDisableFastMath", - "display_name": "intel_disable_fast_math", + "name": "intel_disable_fast_math", "category": "Workarounds", "description": [ "Disable fast math in atan and invariance cases when running below macOS 12.0" @@ -238,8 +213,7 @@ }, { - "name": "multisampleColorFormatShaderReadWorkaround", - "display_name": "multisample_color_format_shader_read_workaround", + "name": "multisample_color_format_shader_read_workaround", "category": "Workarounds", "description": [ "Add shaderRead usage to some multisampled texture formats" @@ -248,8 +222,7 @@ }, { - "name": "copyIOSurfaceToNonIOSurfaceForReadOptimization", - "display_name": "copy_iosurface_to_non_iosurface_for_read_optimization", + "name": "copy_IOSurface_to_non_IOSurface_for_read_optimization", "category": "Workarounds", "description": [ "some GPUs are faster to read an IOSurface texture by first copying the texture to a ", diff --git a/include/platform/vk_features.json b/include/platform/vk_features.json index b474a5958c..1ca9d8b8c1 100644 --- a/include/platform/vk_features.json +++ b/include/platform/vk_features.json @@ -8,8 +8,7 @@ ], "features": [ { - "name": "basicGLLineRasterization", - "display_name": "basicGLLineRasterization", + "name": "basic_GL_line_rasterization", "category": "Features", "description": [ "Enable the use of pixel shader patching to implement OpenGL basic line ", @@ -18,8 +17,7 @@ }, { - "name": "bresenhamLineRasterization", - "display_name": "bresenhamLineRasterization", + "name": "bresenham_line_rasterization", "category": "Features", "description": [ "Enable Bresenham line rasterization via VK_EXT_line_rasterization extension" @@ -27,8 +25,7 @@ }, { - "name": "provokingVertex", - "display_name": "provokingVertex", + "name": "provoking_vertex", "category": "Features", "description": [ "Enable provoking vertex mode via VK_EXT_provoking_vertex extension" @@ -36,8 +33,7 @@ }, { - "name": "forceFallbackFormat", - "display_name": "forceFallbackFormat", + "name": "force_fallback_format", "category": "Workarounds", "description": [ "Force a fallback format for angle_end2end_tests" @@ -45,8 +41,7 @@ }, { - "name": "clampPointSize", - "display_name": "clamp_point_size", + "name": "clamp_point_size", "category": "Workarounds", "description": [ "The point size range reported from the API is inconsistent with the actual behavior" @@ -55,8 +50,7 @@ }, { - "name": "depthClamping", - "display_name": "depth_clamping", + "name": "depth_clamping", "category": "Workarounds", "description": [ "The depth value is not clamped to [0,1] for floating point depth buffers." @@ -65,8 +59,7 @@ }, { - "name": "supportsRenderpass2", - "display_name": "supportsRenderpass2", + "name": "supports_renderpass2", "category": "Features", "description": [ "VkDevice supports the VK_KHR_create_renderpass2 extension" @@ -74,8 +67,7 @@ }, { - "name": "supportsIncrementalPresent", - "display_name": "supportsIncrementalPresent", + "name": "supports_incremental_present", "category": "Features", "description": [ "VkDevice supports the VK_KHR_incremental_present extension" @@ -83,8 +75,7 @@ }, { - "name": "supportsAndroidHardwareBuffer", - "display_name": "supportsAndroidHardwareBuffer", + "name": "supports_android_hardware_buffer", "category": "Features", "description": [ "VkDevice supports the VK_ANDROID_external_memory_android_hardware_buffer extension" @@ -92,8 +83,7 @@ }, { - "name": "supportsGGPFrameToken", - "display_name": "supportsGGPFrameToken", + "name": "supports_GGP_frame_token", "category": "Features", "description": [ "VkDevice supports the VK_GGP_frame_token extension" @@ -101,8 +91,7 @@ }, { - "name": "supportsExternalMemoryFd", - "display_name": "supportsExternalMemoryFd", + "name": "supports_external_memory_fd", "category": "Features", "description": [ "VkDevice supports the VK_KHR_external_memory_fd extension" @@ -110,8 +99,7 @@ }, { - "name": "supportsExternalMemoryFuchsia", - "display_name": "supportsExternalMemoryFuchsia", + "name": "supports_external_memory_fuchsia", "category": "Features", "description": [ "VkDevice supports the VK_FUCHSIA_external_memory extension" @@ -119,8 +107,7 @@ }, { - "name": "supportsFilteringPrecision", - "display_name": "supportsFilteringPrecision", + "name": "supports_filtering_precision", "category": "Features", "description": [ "VkDevice supports the VK_GOOGLE_sampler_filtering_precision extension" @@ -128,8 +115,7 @@ }, { - "name": "supportsExternalFenceCapabilities", - "display_name": "supportsExternalFenceCapabilities", + "name": "supports_external_fence_capabilities", "category": "Features", "description": [ "VkInstance supports the VK_KHR_external_fence_capabilities extension" @@ -137,8 +123,7 @@ }, { - "name": "supportsExternalSemaphoreCapabilities", - "display_name": "supportsExternalSemaphoreCapabilities", + "name": "supports_external_semaphore_capabilities", "category": "Features", "description": [ "VkInstance supports the VK_KHR_external_semaphore_capabilities extension" @@ -146,8 +131,7 @@ }, { - "name": "supportsExternalSemaphoreFd", - "display_name": "supportsExternalSemaphoreFd", + "name": "supports_external_semaphore_fd", "category": "Features", "description": [ "VkDevice supports the VK_KHR_external_semaphore_fd extension" @@ -155,8 +139,7 @@ }, { - "name": "supportsExternalSemaphoreFuchsia", - "display_name": "supportsExternalSemaphoreFuchsia", + "name": "supports_external_semaphore_fuchsia", "category": "Features", "description": [ "VkDevice supports the VK_FUCHSIA_external_semaphore extension" @@ -164,8 +147,7 @@ }, { - "name": "supportsExternalFenceFd", - "display_name": "supportsExternalFenceFd", + "name": "supports_external_fence_fd", "category": "Features", "description": [ "VkDevice supports the VK_KHR_external_fence_fd extension" @@ -174,8 +156,7 @@ }, { - "name": "supportsAndroidNativeFenceSync", - "display_name": "supportsAndroidNativeFenceSync", + "name": "supports_android_native_fence_sync", "category": "Features", "description": [ "VkDevice supports the EGL_ANDROID_native_fence_sync extension" @@ -184,8 +165,7 @@ }, { - "name": "supportsImageCubeArray", - "display_name": "supportsImageCubeArray", + "name": "supports_image_cube_array", "category": "Features", "description": [ "VkDevice supports the imageCubeArray feature properly" @@ -194,8 +174,7 @@ }, { - "name": "supportsPipelineStatisticsQuery", - "display_name": "supportsPipelineStatisticsQuery", + "name": "supports_pipeline_statistics_query", "category": "Features", "description": [ "VkDevice supports the pipelineStatisticsQuery feature" @@ -204,8 +183,7 @@ }, { - "name": "supportsShaderStencilExport", - "display_name": "supportsShaderStencilExport", + "name": "supports_shader_stencil_export", "category": "Features", "description": [ "VkDevice supports the VK_EXT_shader_stencil_export extension" @@ -213,8 +191,7 @@ }, { - "name": "supportsYUVSamplerConversion", - "display_name": "supportsYUVSamplerConversion", + "name": "supports_YUV_sampler_conversion", "category": "Features", "description": [ "VkDevice supports the VK_KHR_sampler_ycbcr_conversion extension" @@ -222,8 +199,7 @@ }, { - "name": "emulateTransformFeedback", - "display_name": "emulateTransformFeedback", + "name": "emulate_transform_feedback", "category": "Features", "description": [ "Emulate transform feedback as the VK_EXT_transform_feedback is not present." @@ -232,8 +208,7 @@ }, { - "name": "supportsTransformFeedbackExtension", - "display_name": "supportsTransformFeedbackExtension", + "name": "supports_transform_feedback_extension", "category": "Features", "description": [ "Transform feedback uses the VK_EXT_transform_feedback extension." @@ -242,8 +217,7 @@ }, { - "name": "supportsGeometryStreamsCapability", - "display_name": "supportsGeometryStreamsCapability", + "name": "supports_geometry_streams_capability", "category": "Features", "description": [ "Implementation supports the GeometryStreams SPIR-V capability." @@ -252,8 +226,7 @@ }, { - "name": "supportsIndexTypeUint8", - "display_name": "supportsIndexTypeUint8", + "name": "supports_index_type_uint8", "category": "Features", "description": [ "VkDevice supports the VK_EXT_index_type_uint8 extension" @@ -262,8 +235,7 @@ }, { - "name": "supportsCustomBorderColor", - "display_name": "supportsCustomBorderColor", + "name": "supports_custom_border_color", "category": "Features", "description": [ "VkDevice supports the VK_EXT_custom_border_color extension" @@ -272,8 +244,7 @@ }, { - "name": "supportsMultiDrawIndirect", - "display_name": "supportsMultiDrawIndirect", + "name": "supports_multi_draw_indirect", "category": "Features", "description": [ "VkDevice supports the multiDrawIndirect extension" @@ -282,8 +253,7 @@ }, { - "name": "supportsDepthStencilResolve", - "display_name": "supportsDepthStencilResolve", + "name": "supports_depth_stencil_resolve", "category": "Features", "description": [ "VkDevice supports the VK_KHR_depth_stencil_resolve ", @@ -293,8 +263,7 @@ }, { - "name": "supportsMultisampledRenderToSingleSampled", - "display_name": "supportsMultisampledRenderToSingleSampled", + "name": "supports_multisampled_render_to_single_sampled", "category": "Features", "description": [ "VkDevice supports the VK_EXT_multisampled_render_to_single_sampled extension" @@ -303,8 +272,7 @@ }, { - "name": "supportsMultiview", - "display_name": "supportsMultiview", + "name": "supports_multiview", "category": "Features", "description": [ "VkDevice supports the VK_KHR_multiview extension" @@ -313,8 +281,7 @@ }, { - "name": "disableFifoPresentMode", - "display_name": "disableFifoPresentMode", + "name": "disable_fifo_present_mode", "category": "Workarounds", "description": [ "VK_PRESENT_MODE_FIFO_KHR causes random timeouts" @@ -323,8 +290,7 @@ }, { - "name": "bindEmptyForUnusedDescriptorSets", - "display_name": "bindEmptyForUnusedDescriptorSets", + "name": "bind_empty_for_unused_descriptor_sets", "category": "Workarounds", "description": [ "Gaps in bound descriptor set indices causes the post-gap sets to misbehave" @@ -333,8 +299,7 @@ }, { - "name": "forceD16TexFilter", - "display_name": "forceD16TexFilter", + "name": "force_D16_tex_filter", "category": "Workarounds", "description": [ "VK_FORMAT_D16_UNORM does not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT, ", @@ -344,8 +309,7 @@ }, { - "name": "disableFlippingBlitWithCommand", - "display_name": "disableFlippingBlitWithCommand", + "name": "disable_flipping_blit_with_command", "category": "Workarounds", "description": [ "vkCmdBlitImage with flipped coordinates blits incorrectly." @@ -354,8 +318,7 @@ }, { - "name": "perFrameWindowSizeQuery", - "display_name": "perFrameWindowSizeQuery", + "name": "per_frame_window_size_query", "category": "Workarounds", "description": [ "Vulkan swapchain is not returning VK_ERROR_OUT_OF_DATE when window resizing" @@ -364,8 +327,7 @@ }, { - "name": "disallowSeamfulCubeMapEmulation", - "display_name": "disallowSeamfulCubeMapEmulation", + "name": "disallow_seamful_cube_map_emulation", "category": "Workarounds", "description": [ "Seamful cube map emulation misbehaves on some drivers, so it's disallowed" @@ -374,8 +336,7 @@ }, { - "name": "padBuffersToMaxVertexAttribStride", - "display_name": "padBuffersToMaxVertexAttribStride", + "name": "pad_buffers_to_max_vertex_attrib_stride", "category": "Workarounds", "description": [ "Vulkan considers vertex attribute accesses to count up to the last multiple of the ", @@ -389,8 +350,7 @@ }, { - "name": "supportsExternalMemoryDmaBufAndModifiers", - "display_name": "supportsExternalMemoryDmaBufAndModifiers", + "name": "supports_external_memory_dma_buf_and_modifiers", "category": "Features", "description": [ "VkDevice supports the VK_EXT_external_memory_dma_buf and VK_EXT_image_drm_format_modifier ", @@ -400,8 +360,7 @@ }, { - "name": "supportsExternalMemoryHost", - "display_name": "supportsExternalMemoryHost", + "name": "supports_external_memory_host", "category": "Features", "description": [ "VkDevice supports the VK_EXT_external_memory_host extension" @@ -409,8 +368,7 @@ }, { - "name": "allocateNonZeroMemory", - "display_name": "allocateNonZeroMemory", + "name": "allocate_non_zero_memory", "category": "Features", "description": [ "Fill new allocations with non-zero values to flush out errors." @@ -419,8 +377,7 @@ }, { - "name": "logMemoryReportCallbacks", - "display_name": "logMemoryReportCallbacks", + "name": "log_memory_report_callbacks", "category": "Features", "description": [ "Log each callback from VK_EXT_device_memory_report" @@ -428,8 +385,7 @@ }, { - "name": "logMemoryReportStats", - "display_name": "logMemoryReportStats", + "name": "log_memory_report_stats", "category": "Features", "description": [ "Log stats from VK_EXT_device_memory_report each swap" @@ -437,8 +393,7 @@ }, { - "name": "shadowBuffers", - "display_name": "shadowBuffers", + "name": "shadow_buffers", "category": "Features", "description": [ "Allocate a shadow buffer for GL buffer objects to reduce glMap* latency." @@ -447,8 +402,7 @@ }, { - "name": "preferCPUForBufferSubData", - "display_name": "preferCPUForBufferSubData", + "name": "prefer_CPU_for_buffer_sub_data", "category": "Features", "description": [ "Prefer use CPU to do bufferSubData instead of staged update." @@ -457,8 +411,7 @@ }, { - "name": "persistentlyMappedBuffers", - "display_name": "persistentlyMappedBuffers", + "name": "persistently_mapped_buffers", "category": "Features", "description": [ "Persistently map buffer memory to reduce map/unmap IOCTL overhead." @@ -467,8 +420,7 @@ }, { - "name": "enablePreRotateSurfaces", - "display_name": "enablePreRotateSurfaces", + "name": "enable_pre_rotate_surfaces", "category": "Features", "description": [ "Enable Android pre-rotation for landscape applications" @@ -477,8 +429,7 @@ }, { - "name": "enablePrecisionQualifiers", - "display_name": "enablePrecisionQualifiers", + "name": "enable_precision_qualifiers", "category": "Features", "description": [ "Enable precision qualifiers in shaders" @@ -487,8 +438,7 @@ }, { - "name": "preferAggregateBarrierCalls", - "display_name": "preferAggregateBarrierCalls", + "name": "prefer_aggregate_barrier_calls", "category": "Workarounds", "description": [ "Single barrier call is preferred over multiple calls with ", @@ -498,8 +448,7 @@ }, { - "name": "preferSkippingInvalidateForEmulatedFormats", - "display_name": "preferSkippingInvalidateForEmulatedFormats", + "name": "prefer_skipping_invalidate_for_emulated_formats", "category": "Workarounds", "description": [ "Skipping invalidate is preferred for emulated formats that have extra channels over ", @@ -509,8 +458,7 @@ }, { - "name": "asyncCommandQueue", - "display_name": "asyncCommandQueue", + "name": "async_command_queue", "category": "Features", "description": [ "Use CommandQueue worker thread to dispatch work to GPU." @@ -519,8 +467,7 @@ }, { - "name": "supportsShaderFloat16", - "display_name": "supportsShaderFloat16", + "name": "supports_shader_float16", "category": "Features", "description": [ "VkDevice supports the VK_KHR_shader_float16_int8 extension ", @@ -530,8 +477,7 @@ }, { - "name": "allowGenerateMipmapWithCompute", - "display_name": "allowGenerateMipmapWithCompute", + "name": "allow_GenerateMipmap_with_compute", "category": "Features", "description": [ "Use the compute path to generate mipmaps on devices that meet the minimum requirements, ", @@ -541,8 +487,7 @@ }, { - "name": "supportsRenderPassStoreOpNoneQCOM", - "display_name": "supportsRenderPassStoreOpNoneQCOM", + "name": "supports_render_pass_store_op_none", "category": "Features", "description": [ "VkDevice supports VK_QCOM_render_pass_store_ops extension." @@ -551,8 +496,7 @@ }, { - "name": "supportsRenderPassLoadStoreOpNone", - "display_name": "supportsRenderPassLoadStoreOpNone", + "name": "supports_render_pass_load_store_op_none", "category": "Features", "description": [ "VkDevice supports VK_EXT_load_store_op_none extension." @@ -561,8 +505,7 @@ }, { - "name": "supportsDepthClipControl", - "display_name": "supportsDepthClipControl", + "name": "supports_depth_clip_control", "category": "Features", "description": [ "VkDevice supports VK_EXT_depth_clip_control extension." @@ -571,8 +514,7 @@ }, { - "name": "supportsBlendOperationAdvanced", - "display_name": "supportsBlendOperationAdvanced", + "name": "supports_blend_operation_advanced", "category": "Features", "description": [ "VkDevice supports VK_EXT_blend_operation_advanced extension." @@ -581,8 +523,7 @@ }, { - "name": "forceMaxUniformBufferSize16KB", - "display_name": "forceMaxUniformBufferSize16KB", + "name": "force_max_uniform_buffer_size_16KB", "category": "Workarounds", "description": [ "Force max uniform buffer size to 16K on some device due to bug" @@ -591,8 +532,7 @@ }, { - "name": "supportsImageFormatList", - "display_name": "supportsImageFormatList", + "name": "supports_image_format_list", "category": "Features", "description": [ "Enable VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT by default for ICDs ", @@ -602,8 +542,7 @@ }, { - "name": "enableMultisampledRenderToTexture", - "display_name": "enableMultisampledRenderToTexture", + "name": "enable_multisampled_render_to_texture", "category": "Workarounds", "description": [ "Expose EXT_multisampled_render_to_texture" @@ -612,8 +551,7 @@ }, { - "name": "deferFlushUntilEndRenderPass", - "display_name": "deferFlushUntilEndRenderPass", + "name": "defer_flush_until_end_render_pass", "category": "Workarounds", "description": [ "Allow glFlush to be deferred until renderpass ends" @@ -622,8 +560,7 @@ }, { - "name": "waitIdleBeforeSwapchainRecreation", - "display_name": "waitIdleBeforeSwapchainRecreation", + "name": "wait_idle_before_swapchain_recreation", "category": "Workarounds", "description": [ "Before passing an oldSwapchain to VkSwapchainCreateInfoKHR, wait for queue to be idle. ", @@ -633,8 +570,7 @@ }, { - "name": "forceTextureLodOffset1", - "display_name": "force_texture_lod_offset_1", + "name": "force_texture_lod_offset_1", "category": "Workarounds", "description": [ "Increase the minimum texture level-of-detail by 1 when sampling." @@ -642,8 +578,7 @@ }, { - "name": "forceTextureLodOffset2", - "display_name": "force_texture_lod_offset_2", + "name": "force_texture_lod_offset_2", "category": "Workarounds", "description": [ "Increase the minimum texture level-of-detail by 2 when sampling." @@ -651,8 +586,7 @@ }, { - "name": "forceTextureLodOffset3", - "display_name": "force_texture_lod_offset_3", + "name": "force_texture_lod_offset_3", "category": "Workarounds", "description": [ "Increase the minimum texture level-of-detail by 3 when sampling." @@ -660,8 +594,7 @@ }, { - "name": "forceTextureLodOffset4", - "display_name": "force_texture_lod_offset_4", + "name": "force_texture_lod_offset_4", "category": "Workarounds", "description": [ "Increase the minimum texture level-of-detail by 4 when sampling." @@ -669,8 +602,7 @@ }, { - "name": "forceNearestFiltering", - "display_name": "force_nearest_filtering", + "name": "force_nearest_filtering", "category": "Workarounds", "description": [ "Force nearest filtering when sampling." @@ -678,8 +610,7 @@ }, { - "name": "forceNearestMipFiltering", - "display_name": "forceNearestMipFiltering", + "name": "force_nearest_mip_filtering", "category": "Workarounds", "description": [ "Force nearest mip filtering when sampling." @@ -687,8 +618,7 @@ }, { - "name": "compressVertexData", - "display_name": "compress_vertex_data", + "name": "compress_vertex_data", "category": "Workarounds", "description": [ "Compress vertex data to smaller data types when ", @@ -697,8 +627,7 @@ }, { - "name": "preferDrawClearOverVkCmdClearAttachments", - "display_name": "preferDrawClearOverVkCmdClearAttachments", + "name": "prefer_draw_clear_over_vkCmdClearAttachments", "category": "Workarounds", "description": [ "On some hardware, clear using a draw call instead of vkCmdClearAttachments in the middle ", @@ -708,8 +637,7 @@ }, { - "name": "emulatedPrerotation90", - "display_name": "emulatedPrerotation90", + "name": "emulated_prerotation_90", "category": "Features", "description": [ "Emulate 90-degree prerotation." @@ -718,8 +646,7 @@ }, { - "name": "emulatedPrerotation180", - "display_name": "emulatedPrerotation180", + "name": "emulated_prerotation_180", "category": "Features", "description": [ "Emulate 180-degree prerotation." @@ -728,8 +655,7 @@ }, { - "name": "emulatedPrerotation270", - "display_name": "emulatedPrerotation270", + "name": "emulated_prerotation_270", "category": "Features", "description": [ "Emulate 270-degree prerotation." @@ -738,8 +664,7 @@ }, { - "name": "generateSPIRVThroughGlslang", - "display_name": "generateSPIRVThroughGlslang", + "name": "generate_SPIRV_through_glslang", "category": "Features", "description": [ "Translate SPIR-V through glslang." @@ -748,8 +673,7 @@ }, { - "name": "forceDriverUniformOverSpecConst", - "display_name": "forceDriverUniformOverSpecConst", + "name": "force_driver_uniform_over_spec_const", "category": "Workarounds", "description": [ "Forces using driver uniforms instead of specialization constants." @@ -758,8 +682,7 @@ }, { - "name": "exposeNonConformantExtensionsAndVersions", - "display_name": "exposeNonConformantExtensionsAndVersions", + "name": "expose_non_conformant_extensions_and_versions", "category": "Workarounds", "description": [ "Expose GLES versions and extensions that are not conformant." @@ -768,8 +691,7 @@ }, { - "name": "emulateR32fImageAtomicExchange", - "display_name": "emulateR32fImageAtomicExchange", + "name": "emulate_R32f_image_atomic_exchange", "category": "Workarounds", "description": [ "Emulate r32f images with r32ui to support imageAtomicExchange." @@ -778,8 +700,7 @@ }, { - "name": "supportsNegativeViewport", - "display_name": "supportsNegativeViewport", + "name": "supports_negative_viewport", "category": "Features", "description": [ "The driver supports inverting the viewport with a negative height." @@ -787,8 +708,7 @@ }, { - "name": "forceFragmentShaderPrecisionHighpToMediump", - "display_name": "forceFragmentShaderPrecisionHighpToMediump", + "name": "force_fragment_shader_precision_highp_to_mediump", "category": "Workarounds", "description": [ "Forces highp precision in fragment shader to mediump." @@ -797,8 +717,7 @@ }, { - "name": "preferSubmitAtFBOBoundary", - "display_name": "preferSubmitAtFBOBoundary", + "name": "prefer_submit_at_FBO_boundary", "category": "Workarounds", "description": [ "Submit commands to driver at each FBO boundary for performance improvements." @@ -807,8 +726,7 @@ }, { - "name": "useMultipleDescriptorsForExternalFormats", - "display_name": "useMultipleDescriptorsForExternalFormats", + "name": "use_multiple_descriptors_for_external_formats", "category": "Workarounds", "description": [ "Return a default descriptor count for external formats." @@ -817,8 +735,7 @@ }, { - "name": "supportsProtectedMemory", - "display_name": "supportsProtectedMemory", + "name": "supports_protected_memory", "category": "Features", "description": [ "VkDevice supports protected memory" @@ -827,8 +744,7 @@ }, { - "name": "supportsHostQueryReset", - "display_name": "supportsHostQueryReset", + "name": "supports_host_query_reset", "category": "Features", "description": [ "VkDevice supports VK_EXT_host_query_reset extension" @@ -837,8 +753,7 @@ }, { - "name": "supportsSurfaceCapabilities2Extension", - "display_name": "supportsSurfaceCapabilities2Extension", + "name": "supports_surface_capabilities2_extension", "category": "Features", "description": [ "VkInstance supports the VK_KHR_get_surface_capabilities2 extension" @@ -846,8 +761,7 @@ }, { - "name": "supportsSurfaceProtectedCapabilitiesExtension", - "display_name": "supportsSurfaceProtectedCapabilitiesExtension", + "name": "supports_surface_protected_capabilities_extension", "category": "Features", "description": [ "VkInstance supports the VK_KHR_surface_protected_capabilities extension" @@ -855,8 +769,7 @@ }, { - "name": "supportsSurfacelessQueryExtension", - "display_name": "supportsSurfacelessQueryExtension", + "name": "supports_surfaceless_query_extension", "category": "Features", "description": [ "VkInstance supports the VK_GOOGLE_surfaceless_query extension" @@ -864,8 +777,7 @@ }, { - "name": "supportsSurfaceProtectedSwapchains", - "display_name": "supportsSurfaceProtectedSwapchains", + "name": "supports_surface_protected_swapchains", "category": "Features", "description": [ "VkSurface supportsProtected for protected swapchains" @@ -873,8 +785,7 @@ }, { - "name": "overrideSurfaceFormatRGB8toRGBA8", - "display_name": "overrideSurfaceFormatRGB8toRGBA8", + "name": "override_surface_format_RGB8_to_RGBA8", "category": "Workarounds", "description": [ "Override surface format GL_RGB8 to GL_RGBA8" @@ -883,8 +794,7 @@ }, { - "name": "supportsSharedPresentableImageExtension", - "display_name": "supportsSharedPresentableImageExtension", + "name": "supports_shared_presentable_image_extension", "category": "Features", "description": [ "VkSurface supports the VK_KHR_shared_presentable_images extension" @@ -892,8 +802,7 @@ }, { - "name": "supportsShaderFramebufferFetch", - "display_name": "supportsShaderFramebufferFetch", + "name": "supports_shader_framebuffer_fetch", "category": "Features", "description": [ "Whether the Vulkan backend supports coherent framebuffer fetch" @@ -901,8 +810,7 @@ }, { - "name": "supportsShaderFramebufferFetchNonCoherent", - "display_name": "supportsShaderFramebufferFetchNonCoherent", + "name": "supports_shader_framebuffer_fetch_non_coherent", "category": "Features", "description": [ "Whether the Vulkan backend supports non-coherent framebuffer fetch" @@ -910,8 +818,7 @@ }, { - "name": "supportsLockSurfaceExtension", - "display_name": "supportsLockSurfaceExtension", + "name": "supports_lock_surface_extension", "category": "Features", "description": [ "Surface supports the EGL_KHR_lock_surface3 extension" @@ -919,8 +826,7 @@ }, { - "name": "swapbuffersOnFlushOrFinishWithSingleBuffer", - "display_name": "swapbuffersOnFlushOrFinishWithSingleBuffer", + "name": "swapbuffers_on_flush_or_finish_with_single_buffer", "category": "Features", "description": [ "Bypass deferredFlush with calling swapbuffers on flush or finish when in Shared Present ", @@ -930,8 +836,7 @@ }, { - "name": "emulateDithering", - "display_name": "emulateDithering", + "name": "emulate_dithering", "category": "Features", "description": [ "Emulate OpenGL dithering" @@ -940,8 +845,7 @@ }, { - "name": "emulateAdvancedBlendEquations", - "display_name": "emulateAdvancedBlendEquations", + "name": "emulate_advanced_blend_equations", "category": "Features", "description": [ "Emulate GL_KHR_blend_equation_advanced" @@ -950,8 +854,7 @@ }, { - "name": "bottomLeftOriginPresentRegionRectangles", - "display_name": "bottomLeftOriginPresentRegionRectangles", + "name": "bottom_left_origin_present_region_rectangles", "category": "Workarounds", "description": [ "On some platforms present region rectangles are expected to have a bottom-left origin, ", @@ -960,8 +863,7 @@ }, { - "name": "forceSubmitImmutableTextureUpdates", - "display_name": "forceSubmitImmutableTextureUpdates", + "name": "force_submit_immutable_texture_updates", "category": "AppWorkarounds", "description": [ "Force submit updates to immutable textures" @@ -970,8 +872,7 @@ }, { - "name": "retainSpirvDebugInfo", - "display_name": "retainSpirvDebugInfo", + "name": "retain_SPIRV_debug_info", "category": "Features", "description": [ "Retain debug info in SPIR-V blob." @@ -980,8 +881,7 @@ }, { - "name": "createPipelineDuringLink", - "display_name": "createPipelineDuringLink", + "name": "create_pipeline_during_link", "category": "Features", "description": [ "Create pipeline with default state during glLinkProgram" diff --git a/scripts/code_generation_hashes/ANGLE_features.json b/scripts/code_generation_hashes/ANGLE_features.json index 6b97211bc7..3c244996a0 100644 --- a/scripts/code_generation_hashes/ANGLE_features.json +++ b/scripts/code_generation_hashes/ANGLE_features.json @@ -1,28 +1,28 @@ { "include/platform/FeaturesD3D.h": - "66f7409cc3fed196ef4b30fa2a911cf5", + "1333a97be19dac076944fd00e46a9c7d", "include/platform/FeaturesGL.h": - "c29f5ed18ab719dc01c42221bde72519", + "2d35716bcbfc713b0968f2571d783e8f", "include/platform/FeaturesMtl.h": - "351a698b8956590eb64afe7a0872cf0c", + "84ab0985624641c8b3894c3ab08820cf", "include/platform/FeaturesVk.h": - "9ef07a932e5fce68c47180bcf0accce3", + "52c0687135636d701cf7c43f6358e9c4", "include/platform/FrontendFeatures.h": - "69191d0121faa83ad7e38eccf454fb91", + "ee4c60a2388ec39b3a63488a3f42282c", "include/platform/d3d_features.json": - "abdcf90e79eb2aae4f55a33b1ca17b72", + "9446c8351c963d8550ff7bf246834907", "include/platform/frontend_features.json": - "cf60ba62068fbd82274a20fbbb5a3030", + "53df8a8be9795eaad30044456f85b7f0", "include/platform/gen_features.py": - "d717215ff1884d23cde74db5074188e0", + "a5d356a52dab33dd3865c74363e66a53", "include/platform/gl_features.json": - "ff2f4dac740e071f511f751f59f3ef31", + "722ca2cf6ba57112fda359171bcea9d3", "include/platform/mtl_features.json": - "82d4a2487985b1ba5f440c88bba22e1c", + "9ff73684f28ff8df40fb66da8fe4713a", "include/platform/vk_features.json": - "88a1d0be37101c4a0bd90ddabff23a7d", + "80d2fa526bd59fcb6df368cc3b5f510d", "util/angle_features_autogen.cpp": - "0493a7bb6d4c1501faf2167e785e4505", + "79f67c452a945a5515d16ac80035f00c", "util/angle_features_autogen.h": - "7de3794b3d93f8094fde74e2329f9374" + "337975ddfeed8355d04983f41067f0ec" }
\ No newline at end of file diff --git a/src/common/string_utils.cpp b/src/common/string_utils.cpp index 6956c230cd..a208555831 100644 --- a/src/common/string_utils.cpp +++ b/src/common/string_utils.cpp @@ -272,6 +272,30 @@ int ReplaceAllSubstrings(std::string *str, return count; } +std::string ToCamelCase(const std::string &str) +{ + std::string result; + + bool lastWasUnderscore = false; + for (char c : str) + { + if (c == '_') + { + lastWasUnderscore = true; + continue; + } + + if (lastWasUnderscore) + { + c = static_cast<char>(std::toupper(c)); + lastWasUnderscore = false; + } + result += c; + } + + return result; +} + std::vector<std::string> GetStringsFromEnvironmentVarOrAndroidProperty(const char *varName, const char *propertyName, const char *separator) diff --git a/src/common/string_utils.h b/src/common/string_utils.h index fadfe17d7a..a16ddddb28 100644 --- a/src/common/string_utils.h +++ b/src/common/string_utils.h @@ -103,6 +103,9 @@ int ReplaceAllSubstrings(std::string *str, const std::string &substring, const std::string &replacement); +// Takes a snake_case string and turns it into camelCase. +std::string ToCamelCase(const std::string &str); + // Split up a string parsed from an environment variable. std::vector<std::string> GetStringsFromEnvironmentVarOrAndroidProperty(const char *varName, const char *propertyName, diff --git a/src/common/string_utils_unittest.cpp b/src/common/string_utils_unittest.cpp index f34d84095a..d78db0d395 100644 --- a/src/common/string_utils_unittest.cpp +++ b/src/common/string_utils_unittest.cpp @@ -177,6 +177,43 @@ TEST(StringUtilsTest, HexStringToUIntBasic) EXPECT_FALSE(HexStringToUInt(testStringD, &uintValue)); } +// Tests for ToCamelCase +TEST(StringUtilsTest, ToCamelCase) +{ + // No underscore in input; expect identical output + EXPECT_EQ("", ToCamelCase("")); + EXPECT_EQ("a", ToCamelCase("a")); + EXPECT_EQ("AbCdEfG", ToCamelCase("AbCdEfG")); + EXPECT_EQ("aBcDeFg", ToCamelCase("aBcDeFg")); + + // Underscore should be removed and the next character turned upper case + EXPECT_EQ("", ToCamelCase("_")); + EXPECT_EQ("aB", ToCamelCase("a_b")); + EXPECT_EQ("aB", ToCamelCase("a_b")); + EXPECT_EQ("camelCase", ToCamelCase("camel_case")); + EXPECT_EQ("abCDeBEfG", ToCamelCase("abCDe_bEfG")); + + // Multiple underscores + EXPECT_EQ("aBCDEFG", ToCamelCase("a_b_c_d_e_f_g")); + EXPECT_EQ("abCdEfGh", ToCamelCase("ab_cd_ef_gh")); + EXPECT_EQ("aShortName", ToCamelCase("a_short_name")); + EXPECT_EQ("someShortWords", ToCamelCase("some_short_words")); + EXPECT_EQ("bunchOLetters", ToCamelCase("bunch_o_letters")); + EXPECT_EQ("whatEndsInE", ToCamelCase("what_ends_in_e")); + EXPECT_EQ("adjustSrcDstRegionForBlitFramebuffer", + ToCamelCase("adjust_src_dst_region_for_BlitFramebuffer")); + + // Uppercase after underscore + EXPECT_EQ("abCDEFGh", ToCamelCase("ab_CD_eF_Gh")); + EXPECT_EQ("IWasThere", ToCamelCase("I_was_there")); + EXPECT_EQ("whereDidTHATComeFrom", ToCamelCase("where_did_THAT_come_from")); + + // Digits + EXPECT_EQ("ab123c4deF5gHi6J", ToCamelCase("ab1_2_3c_4de_f5g_hi6_j")); + EXPECT_EQ("maxSize16KB", ToCamelCase("max_size_16KB")); + EXPECT_EQ("supportRGBA8", ToCamelCase("support_RGBA8")); +} + // Basic functionality for NamesMatchWithWildcard. TEST(StringUtilsTest, NamesMatchWithWildcard) { diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp index 9356bf22a5..c257f59af3 100644 --- a/src/libANGLE/Context.cpp +++ b/src/libANGLE/Context.cpp @@ -4006,7 +4006,7 @@ void Context::initCaps() // If we're capturing application calls for replay, apply some feature limits to increase // portability of the trace. if (getShareGroup()->getFrameCaptureShared()->enabled() || - getFrontendFeatures().captureLimits.enabled) + getFrontendFeatures().enableCaptureLimits.enabled) { INFO() << "Limit some features because " << (getShareGroup()->getFrameCaptureShared()->enabled() diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp index e71891ed37..96994d1d8c 100644 --- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp @@ -1085,7 +1085,7 @@ void Renderer11::populateRenderer11DeviceCaps() &mRenderer11DeviceCaps.B5G6R5maxSamples); } - if (getFeatures().allowES3OnFL10_0.enabled) + if (getFeatures().allowES3OnFL100.enabled) { mRenderer11DeviceCaps.allowES3OnFL10_0 = true; } diff --git a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp index b23d19bfe8..2e40d4f756 100644 --- a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp +++ b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp @@ -2446,7 +2446,7 @@ void InitializeFeatures(const Renderer11DeviceCaps &deviceCaps, ANGLE_FEATURE_CONDITION(features, mrtPerfWorkaround, true); ANGLE_FEATURE_CONDITION(features, zeroMaxLodWorkaround, isFeatureLevel9_3); ANGLE_FEATURE_CONDITION(features, useInstancedPointSpriteEmulation, isFeatureLevel9_3); - ANGLE_FEATURE_CONDITION(features, allowES3OnFL10_0, false); + ANGLE_FEATURE_CONDITION(features, allowES3OnFL100, false); // TODO(jmadill): Disable workaround when we have a fixed compiler DLL. ANGLE_FEATURE_CONDITION(features, expandIntegerPowExpressions, true); diff --git a/src/libANGLE/renderer/gl/ContextGL.cpp b/src/libANGLE/renderer/gl/ContextGL.cpp index 6ea4d2a4da..dcb8cdb40f 100644 --- a/src/libANGLE/renderer/gl/ContextGL.cpp +++ b/src/libANGLE/renderer/gl/ContextGL.cpp @@ -223,7 +223,7 @@ ANGLE_INLINE angle::Result ContextGL::setDrawArraysState(const gl::Context *cont { const angle::FeaturesGL &features = getFeaturesGL(); if (context->getStateCache().hasAnyActiveClientAttrib() || - (features.shiftInstancedArrayDataWithExtraOffset.enabled && first > 0)) + (features.shiftInstancedArrayDataWithOffset.enabled && first > 0)) { const gl::State &glState = context->getState(); const gl::ProgramExecutable *executable = getState().getProgramExecutable(); @@ -237,7 +237,7 @@ ANGLE_INLINE angle::Result ContextGL::setDrawArraysState(const gl::Context *cont ANGLE_TRY(vaoGL->validateState(context)); #endif // ANGLE_STATE_VALIDATION_ENABLED } - else if (features.shiftInstancedArrayDataWithExtraOffset.enabled && first == 0) + else if (features.shiftInstancedArrayDataWithOffset.enabled && first == 0) { // There could be previous draw call that has modified the attributes // Instead of forcefully streaming attributes, we just rebind the original ones @@ -270,7 +270,7 @@ ANGLE_INLINE angle::Result ContextGL::setDrawElementsState(const gl::Context *co const gl::StateCache &stateCache = context->getStateCache(); const angle::FeaturesGL &features = getFeaturesGL(); - if (features.shiftInstancedArrayDataWithExtraOffset.enabled) + if (features.shiftInstancedArrayDataWithOffset.enabled) { // There might be instanced arrays that are forced streaming for drawArraysInstanced // They cannot be ELEMENT_ARRAY_BUFFER @@ -905,7 +905,7 @@ angle::Result ContextGL::onMakeCurrent(const gl::Context *context) angle::Result ContextGL::onUnMakeCurrent(const gl::Context *context) { ANGLE_TRY(flush(context)); - if (getFeaturesGL().unbindFBOOnContextSwitch.enabled) + if (getFeaturesGL().unbindFBOBeforeSwitchingContext.enabled) { mRenderer->getStateManager()->bindFramebuffer(GL_FRAMEBUFFER, 0); } diff --git a/src/libANGLE/renderer/gl/DisplayGL.cpp b/src/libANGLE/renderer/gl/DisplayGL.cpp index d7222aaed4..8f679b932e 100644 --- a/src/libANGLE/renderer/gl/DisplayGL.cpp +++ b/src/libANGLE/renderer/gl/DisplayGL.cpp @@ -175,7 +175,7 @@ std::string DisplayGL::getRendererDescription() std::string rendererString = GetRendererString(getRenderer()->getFunctions()); const angle::FeaturesGL &features = getRenderer()->getFeatures(); - if (features.sanitizeAmdGpuRendererString.enabled) + if (features.sanitizeAMDGPURendererString.enabled) { return SanitizeRendererString(rendererString); } diff --git a/src/libANGLE/renderer/gl/FramebufferGL.cpp b/src/libANGLE/renderer/gl/FramebufferGL.cpp index 3d20ff5ab7..14b30c4927 100644 --- a/src/libANGLE/renderer/gl/FramebufferGL.cpp +++ b/src/libANGLE/renderer/gl/FramebufferGL.cpp @@ -847,7 +847,7 @@ angle::Result FramebufferGL::blit(const gl::Context *context, gl::Rectangle finalSourceArea(sourceArea); gl::Rectangle finalDestArea(destArea); - if (features.adjustSrcDstRegionBlitFramebuffer.enabled) + if (features.adjustSrcDstRegionForBlitFramebuffer.enabled) { angle::Result result = adjustSrcDstRegion(context, finalSourceArea, finalDestArea, &finalSourceArea, &finalDestArea); @@ -856,7 +856,7 @@ angle::Result FramebufferGL::blit(const gl::Context *context, return result; } } - if (features.clipSrcRegionBlitFramebuffer.enabled) + if (features.clipSrcRegionForBlitFramebuffer.enabled) { angle::Result result = clipSrcRegion(context, finalSourceArea, finalDestArea, &finalSourceArea, &finalDestArea); diff --git a/src/libANGLE/renderer/gl/ShaderGL.cpp b/src/libANGLE/renderer/gl/ShaderGL.cpp index 041922d8a6..da1841622c 100644 --- a/src/libANGLE/renderer/gl/ShaderGL.cpp +++ b/src/libANGLE/renderer/gl/ShaderGL.cpp @@ -340,7 +340,7 @@ std::shared_ptr<WaitableCompileEvent> ShaderGL::compile(const gl::Context *conte additionalOptions |= SH_CLAMP_INDIRECT_ARRAY_BOUNDS; } - if (features.addBaseVertexToVertexID.enabled) + if (features.vertexIDDoesNotIncludeBaseVertex.enabled) { additionalOptions |= SH_ADD_BASE_VERTEX_TO_VERTEX_ID; } diff --git a/src/libANGLE/renderer/gl/TextureGL.cpp b/src/libANGLE/renderer/gl/TextureGL.cpp index eaf4652862..ad9bd10c21 100644 --- a/src/libANGLE/renderer/gl/TextureGL.cpp +++ b/src/libANGLE/renderer/gl/TextureGL.cpp @@ -73,7 +73,7 @@ bool GetDepthStencilWorkaround(GLenum format) bool GetEmulatedAlphaChannel(const angle::FeaturesGL &features, const gl::InternalFormat &originalInternalFormat) { - return (features.rgbDXT1TexturesSampleZeroAlpha.enabled && + return (features.RGBDXT1TexturesSampleZeroAlpha.enabled && originalInternalFormat.sizedInternalFormat == GL_COMPRESSED_RGB_S3TC_DXT1_EXT) || (features.emulateRGB10.enabled && originalInternalFormat.format == GL_RGB && originalInternalFormat.type == GL_UNSIGNED_INT_2_10_10_10_REV_EXT); @@ -1360,7 +1360,7 @@ angle::Result TextureGL::generateMipmap(const gl::Context *context) stateManager->bindTexture(getType(), mTextureID); if (baseLevelInternalFormat.colorEncoding == GL_SRGB && - features.encodeAndDecodeSRGBForGenerateMipmap.enabled && getType() == gl::TextureType::_2D) + features.decodeEncodeSRGBForGenerateMipmap.enabled && getType() == gl::TextureType::_2D) { nativegl::TexImageFormat texImageFormat = nativegl::GetTexImageFormat( functions, features, baseLevelInternalFormat.internalFormat, diff --git a/src/libANGLE/renderer/gl/VertexArrayGL.cpp b/src/libANGLE/renderer/gl/VertexArrayGL.cpp index 309027c0f3..dc981dee0d 100644 --- a/src/libANGLE/renderer/gl/VertexArrayGL.cpp +++ b/src/libANGLE/renderer/gl/VertexArrayGL.cpp @@ -212,7 +212,7 @@ angle::Result VertexArrayGL::syncDrawState(const gl::Context *context, indexRange.start = first; indexRange.end = first + count - 1; - if (features.shiftInstancedArrayDataWithExtraOffset.enabled && first > 0) + if (features.shiftInstancedArrayDataWithOffset.enabled && first > 0) { gl::AttributesMask updatedStreamingAttribsMask = needsStreamingAttribs; auto candidateAttributesMask = @@ -438,7 +438,7 @@ angle::Result VertexArrayGL::streamAttributes( GLuint adjustedDivisor = GetAdjustedDivisor(mAppliedNumViews, binding.getDivisor()); // streamedVertexCount is only going to be modified by - // shiftInstancedArrayDataWithExtraOffset workaround, otherwise it's const + // shiftInstancedArrayDataWithOffset workaround, otherwise it's const size_t streamedVertexCount = ComputeVertexBindingElementCount( adjustedDivisor, indexRange.vertexCount(), instanceCount); diff --git a/src/libANGLE/renderer/gl/formatutilsgl.cpp b/src/libANGLE/renderer/gl/formatutilsgl.cpp index 01d0e779c5..839a6b9c3b 100644 --- a/src/libANGLE/renderer/gl/formatutilsgl.cpp +++ b/src/libANGLE/renderer/gl/formatutilsgl.cpp @@ -507,7 +507,7 @@ static GLenum GetNativeInternalFormat(const FunctionsGL *functions, } if (internalFormat.sizedInternalFormat == GL_RGBA4 && - (features.rgba4IsNotSupportedForColorRendering.enabled || + (features.RGBA4IsNotSupportedForColorRendering.enabled || features.promotePackedFormatsTo8BitPerChannel.enabled)) { // Use an 8-bit format instead @@ -576,7 +576,7 @@ static GLenum GetNativeInternalFormat(const FunctionsGL *functions, } else if (internalFormat.colorEncoding == GL_SRGB) { - if (features.unsizedsRGBReadPixelsDoesntTransform.enabled) + if (features.unsizedSRGBReadPixelsDoesntTransform.enabled) { // Work around some Adreno driver bugs that don't read back SRGB data correctly when // it's in unsized SRGB texture formats. @@ -655,7 +655,7 @@ static GLenum GetNativeFormat(const FunctionsGL *functions, // Transform sRGB formats to RGB if either the GLES driver doesn't support GL_EXT_sRGB, or // to work around Adreno driver bugs reading back unsized sRGB texture data. if (!functions->hasGLESExtension("GL_EXT_sRGB") || - features.unsizedsRGBReadPixelsDoesntTransform.enabled) + features.unsizedSRGBReadPixelsDoesntTransform.enabled) { if (format == GL_SRGB) { diff --git a/src/libANGLE/renderer/gl/renderergl_utils.cpp b/src/libANGLE/renderer/gl/renderergl_utils.cpp index d6eff0dd93..a541a3e890 100644 --- a/src/libANGLE/renderer/gl/renderergl_utils.cpp +++ b/src/libANGLE/renderer/gl/renderergl_utils.cpp @@ -1709,17 +1709,17 @@ void GenerateCaps(const FunctionsGL *functions, // Expose this extension only when we support the formats or we're running on top of a native // ES driver. extensions->compressedTextureEtcANGLE = - (features.allowEtcFormats.enabled || functions->standard == STANDARD_GL_ES) && + (features.allowETCFormats.enabled || functions->standard == STANDARD_GL_ES) && gl::DetermineCompressedTextureETCSupport(*textureCapsMap); // When running on top of desktop OpenGL drivers and allow_etc_formats feature is not enabled, // mark ETC1 as emulated to hide it from WebGL clients. limitations->emulatedEtc1 = - !features.allowEtcFormats.enabled && functions->standard == STANDARD_GL_DESKTOP; + !features.allowETCFormats.enabled && functions->standard == STANDARD_GL_DESKTOP; // To work around broken unsized sRGB textures, sized sRGB textures are used. Disable EXT_sRGB // if those formats are not available. - if (features.unsizedsRGBReadPixelsDoesntTransform.enabled && + if (features.unsizedSRGBReadPixelsDoesntTransform.enabled && !functions->isAtLeastGLES(gl::Version(3, 0))) { extensions->sRGBEXT = false; @@ -1894,13 +1894,13 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ANGLE_FEATURE_CONDITION(features, avoid1BitAlphaTextureFormats, functions->standard == STANDARD_GL_DESKTOP && isAMD); - ANGLE_FEATURE_CONDITION(features, rgba4IsNotSupportedForColorRendering, + ANGLE_FEATURE_CONDITION(features, RGBA4IsNotSupportedForColorRendering, functions->standard == STANDARD_GL_DESKTOP && isIntel); // Although "Sandy Bridge", "Ivy Bridge", and "Haswell" may support GL_ARB_ES3_compatibility // extension, ETC2/EAC formats are emulated there. Newer Intel GPUs support them natively. ANGLE_FEATURE_CONDITION( - features, allowEtcFormats, + features, allowETCFormats, isIntel && !IsSandyBridge(device) && !IsIvyBridge(device) && !IsHaswell(device)); // Ported from gpu_driver_bug_list.json (#183) @@ -1931,7 +1931,7 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ANGLE_FEATURE_CONDITION(features, rewriteFloatUnaryMinusOperator, IsApple() && isIntel && GetMacOSVersion() < OSVersion(10, 12, 0)); - ANGLE_FEATURE_CONDITION(features, addBaseVertexToVertexID, IsApple() && isAMD); + ANGLE_FEATURE_CONDITION(features, vertexIDDoesNotIncludeBaseVertex, IsApple() && isAMD); // Triggers a bug on Marshmallow Adreno (4xx?) driver. // http://anglebug.com/2046 @@ -1982,7 +1982,7 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ANGLE_FEATURE_CONDITION(features, disableBlendFuncExtended, isAMD || isIntel); - ANGLE_FEATURE_CONDITION(features, unsizedsRGBReadPixelsDoesntTransform, + ANGLE_FEATURE_CONDITION(features, unsizedSRGBReadPixelsDoesntTransform, IsAndroid() && isQualcomm); ANGLE_FEATURE_CONDITION(features, queryCounterBitsGeneratesErrors, IsNexus5X(vendor, device)); @@ -2024,14 +2024,14 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ANGLE_FEATURE_CONDITION(features, clearToZeroOrOneBroken, IsApple() && isIntel && GetMacOSVersion() < OSVersion(10, 12, 6)); - ANGLE_FEATURE_CONDITION(features, adjustSrcDstRegionBlitFramebuffer, + ANGLE_FEATURE_CONDITION(features, adjustSrcDstRegionForBlitFramebuffer, IsLinux() || (IsAndroid() && isNvidia) || (IsWindows() && isNvidia) || (IsApple() && functions->standard == STANDARD_GL_ES)); - ANGLE_FEATURE_CONDITION(features, clipSrcRegionBlitFramebuffer, + ANGLE_FEATURE_CONDITION(features, clipSrcRegionForBlitFramebuffer, IsApple() || (IsLinux() && isAMD)); - ANGLE_FEATURE_CONDITION(features, rgbDXT1TexturesSampleZeroAlpha, IsApple()); + ANGLE_FEATURE_CONDITION(features, RGBDXT1TexturesSampleZeroAlpha, IsApple()); ANGLE_FEATURE_CONDITION(features, unfoldShortCircuits, IsApple()); @@ -2081,7 +2081,7 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature (IsAndroid() && IsMaliT8xxOrOlder(functions)) || (IsAndroid() && IsMaliG31OrOlder(functions))); - ANGLE_FEATURE_CONDITION(features, encodeAndDecodeSRGBForGenerateMipmap, IsApple()); + ANGLE_FEATURE_CONDITION(features, decodeEncodeSRGBForGenerateMipmap, IsApple()); // anglebug.com/4674 // The (redundant) explicit exclusion of Windows AMD is because the workaround fails @@ -2155,7 +2155,7 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature // http://crbug.com/1144207 // The Mac bot with Intel Iris GPU seems unaffected by this bug. Exclude the Haswell family for // now. - ANGLE_FEATURE_CONDITION(features, shiftInstancedArrayDataWithExtraOffset, + ANGLE_FEATURE_CONDITION(features, shiftInstancedArrayDataWithOffset, IsApple() && IsIntel(vendor) && !IsHaswell(device)); ANGLE_FEATURE_CONDITION(features, syncVertexArraysToDefault, !nativegl::SupportsVertexArrayObjects(functions)); @@ -2163,12 +2163,12 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature // http://crbug.com/1181193 // On desktop Linux/AMD when using the amdgpu drivers, the precise kernel and DRM version are // leaked via GL_RENDERER. We workaround this too improve user security. - ANGLE_FEATURE_CONDITION(features, sanitizeAmdGpuRendererString, IsLinux() && hasAMD); + ANGLE_FEATURE_CONDITION(features, sanitizeAMDGPURendererString, IsLinux() && hasAMD); // http://crbug.com/1187513 // Imagination drivers are buggy with context switching. It needs to unbind fbo before context // switching to workadround the driver issues. - ANGLE_FEATURE_CONDITION(features, unbindFBOOnContextSwitch, IsPowerVR(vendor)); + ANGLE_FEATURE_CONDITION(features, unbindFBOBeforeSwitchingContext, IsPowerVR(vendor)); // http://crbug.com/1181068 and http://crbug.com/783979 ANGLE_FEATURE_CONDITION(features, flushOnFramebufferChange, @@ -2238,7 +2238,7 @@ void ReInitializeFeaturesAtGPUSwitch(const FunctionsGL *functions, angle::Featur // The Mac bot with Intel Iris GPU seems unaffected by this bug. Exclude the Haswell family for // now. // We need to reinitialize this feature when switching between buggy and non-buggy GPUs. - ANGLE_FEATURE_CONDITION(features, shiftInstancedArrayDataWithExtraOffset, + ANGLE_FEATURE_CONDITION(features, shiftInstancedArrayDataWithOffset, IsApple() && IsIntel(vendor) && !IsHaswell(device)); } diff --git a/src/libANGLE/renderer/metal/DisplayMtl.mm b/src/libANGLE/renderer/metal/DisplayMtl.mm index c464e65211..3008823731 100644 --- a/src/libANGLE/renderer/metal/DisplayMtl.mm +++ b/src/libANGLE/renderer/metal/DisplayMtl.mm @@ -1062,7 +1062,7 @@ void DisplayMtl::initializeFeatures() // http://anglebug.com/4919 // Stencil blit shader is not compiled on Intel & NVIDIA, need investigation. - ANGLE_FEATURE_CONDITION((&mFeatures), hasStencilOutput, + ANGLE_FEATURE_CONDITION((&mFeatures), hasShaderStencilOutput, isMetal2_1 && !isIntel() && !isNVIDIA()); ANGLE_FEATURE_CONDITION((&mFeatures), hasTextureSwizzle, @@ -1085,7 +1085,7 @@ void DisplayMtl::initializeFeatures() ANGLE_FEATURE_CONDITION((&mFeatures), hasNonUniformDispatch, isOSX || isCatalyst || supportsAppleGPUFamily(4)); - ANGLE_FEATURE_CONDITION((&mFeatures), allowSeparatedDepthStencilBuffers, + ANGLE_FEATURE_CONDITION((&mFeatures), allowSeparateDepthStencilBuffers, !isOSX && !isCatalyst && !isSimulator); ANGLE_FEATURE_CONDITION((&mFeatures), rewriteRowMajorMatrices, true); ANGLE_FEATURE_CONDITION((&mFeatures), emulateTransformFeedback, true); diff --git a/src/libANGLE/renderer/metal/FrameBufferMtl.mm b/src/libANGLE/renderer/metal/FrameBufferMtl.mm index 70fc858e23..daf8e3a90b 100644 --- a/src/libANGLE/renderer/metal/FrameBufferMtl.mm +++ b/src/libANGLE/renderer/metal/FrameBufferMtl.mm @@ -487,7 +487,7 @@ angle::Result FramebufferMtl::blitWithDraw(const gl::Context *context, dsBlitParams.srcLevel = srcStencilRt->getLevelIndex(); dsBlitParams.srcLayer = srcStencilRt->getLayerIndex(); - if (!contextMtl->getDisplay()->getFeatures().hasStencilOutput.enabled && + if (!contextMtl->getDisplay()->getFeatures().hasShaderStencilOutput.enabled && mStencilRenderTarget) { // Directly writing to stencil in shader is not supported, use temporary copy buffer @@ -551,7 +551,7 @@ gl::FramebufferStatus FramebufferMtl::checkStatus(const gl::Context *context) co } ContextMtl *contextMtl = mtl::GetImpl(context); - if (!contextMtl->getDisplay()->getFeatures().allowSeparatedDepthStencilBuffers.enabled && + if (!contextMtl->getDisplay()->getFeatures().allowSeparateDepthStencilBuffers.enabled && mState.hasSeparateDepthAndStencilAttachments()) { return gl::FramebufferStatus::Incomplete( diff --git a/src/libANGLE/renderer/metal/SurfaceMtl.mm b/src/libANGLE/renderer/metal/SurfaceMtl.mm index 6855e4516c..b1949b58f6 100644 --- a/src/libANGLE/renderer/metal/SurfaceMtl.mm +++ b/src/libANGLE/renderer/metal/SurfaceMtl.mm @@ -97,7 +97,7 @@ SurfaceMtl::SurfaceMtl(DisplayMtl *display, if (depthBits && stencilBits) { - if (display->getFeatures().allowSeparatedDepthStencilBuffers.enabled) + if (display->getFeatures().allowSeparateDepthStencilBuffers.enabled) { mDepthFormat = display->getPixelFormat(kDefaultFrameBufferDepthFormatId); mStencilFormat = display->getPixelFormat(kDefaultFrameBufferStencilFormatId); diff --git a/src/libANGLE/renderer/metal/mtl_render_utils.mm b/src/libANGLE/renderer/metal/mtl_render_utils.mm index 1613ee9b7f..ad9e886134 100644 --- a/src/libANGLE/renderer/metal/mtl_render_utils.mm +++ b/src/libANGLE/renderer/metal/mtl_render_utils.mm @@ -1746,7 +1746,7 @@ angle::Result DepthStencilBlitUtils::setupDepthStencilBlitWithDraw( { cmdEncoder->setFragmentTexture(params.srcStencil, 1); - if (!contextMtl->getDisplay()->getFeatures().hasStencilOutput.enabled) + if (!contextMtl->getDisplay()->getFeatures().hasShaderStencilOutput.enabled) { // Hardware must support stencil writing directly in shader. UNREACHABLE(); diff --git a/src/libANGLE/renderer/renderer_utils.cpp b/src/libANGLE/renderer/renderer_utils.cpp index a896d88c34..9ac2be7e8c 100644 --- a/src/libANGLE/renderer/renderer_utils.cpp +++ b/src/libANGLE/renderer/renderer_utils.cpp @@ -24,6 +24,75 @@ #include "platform/Feature.h" #include <string.h> +#include <cctype> + +namespace angle +{ +namespace +{ +// For the sake of feature name matching, underscore is ignored, and the names are matched +// case-insensitive. This allows feature names to be overriden both in snake_case (previously used +// by ANGLE) and camelCase. +bool FeatureNameMatch(const std::string &a, const std::string &b) +{ + size_t ai = 0; + size_t bi = 0; + + while (ai < a.size() && bi < b.size()) + { + if (a[ai] == '_') + { + ++ai; + } + if (b[bi] == '_') + { + ++bi; + } + if (std::tolower(a[ai++]) != std::tolower(b[bi++])) + { + return false; + } + } + + return ai == a.size() && bi == b.size(); +} + +// Search for a feature by name, matching it loosely so that both snake_case and camelCase names are +// matched. +FeatureInfo *FindFeatureByName(FeatureMap *features, const std::string &name) +{ + for (auto iter : *features) + { + if (FeatureNameMatch(iter.first, name)) + { + return iter.second; + } + } + return nullptr; +} +} // anonymous namespace + +// FeatureSetBase implementation +void FeatureSetBase::overrideFeatures(const std::vector<std::string> &featureNames, bool enabled) +{ + for (const std::string &name : featureNames) + { + FeatureInfo *feature = FindFeatureByName(&members, name); + if (feature != nullptr) + { + feature->enabled = enabled; + } + } +} + +void FeatureSetBase::populateFeatureList(FeatureList *features) const +{ + for (FeatureMap::const_iterator it = members.begin(); it != members.end(); it++) + { + features->push_back(it->second); + } +} +} // namespace angle namespace rx { @@ -225,7 +294,6 @@ void SetFloatUniformMatrixFast(unsigned int arrayElementOffset, memcpy(targetData, valueData, matrixSize * count); } - } // anonymous namespace void RotateRectangle(const SurfaceRotation rotation, @@ -1012,6 +1080,7 @@ void ApplyFeatureOverrides(angle::FeatureSetBase *features, const egl::DisplaySt std::vector<std::string> overridesDisabled = angle::GetCachedStringsFromEnvironmentVarOrAndroidProperty( kAngleFeatureOverridesDisabledEnvName, kAngleFeatureOverridesDisabledPropertyName, ":"); + features->overrideFeatures(overridesEnabled, true); LogFeatureStatus(*features, overridesEnabled, true); diff --git a/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp b/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp index 671eb696ec..87ea465241 100644 --- a/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp +++ b/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp @@ -199,7 +199,7 @@ angle::Result ProgramInfo::initProgram(ContextVk *contextVk, options.shaderType = shaderType; options.removeEarlyFragmentTestsOptimization = shaderType == gl::ShaderType::Fragment && optionBits.removeEarlyFragmentTestsOptimization; - options.removeDebugInfo = !contextVk->getFeatures().retainSpirvDebugInfo.enabled; + options.removeDebugInfo = !contextVk->getFeatures().retainSPIRVDebugInfo.enabled; options.isTransformFeedbackStage = isLastPreFragmentStage && isTransformFeedbackProgram && !optionBits.removeTransformFeedbackEmulation; options.isTransformFeedbackEmulated = contextVk->getFeatures().emulateTransformFeedback.enabled; diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp index 1b901b9a32..cfa1476310 100644 --- a/src/libANGLE/renderer/vulkan/RendererVk.cpp +++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp @@ -584,7 +584,7 @@ DebugMessageReport ShouldReportDebugMessage(RendererVk *renderer, // Then check with syncval messages: const bool isStoreOpNoneSupported = renderer->getFeatures().supportsRenderPassLoadStoreOpNone.enabled || - renderer->getFeatures().supportsRenderPassStoreOpNoneQCOM.enabled; + renderer->getFeatures().supportsRenderPassStoreOpNone.enabled; const bool isFramebufferFetchUsed = renderer->isFramebufferFetchUsed(); for (const SkippedSyncvalMessage &msg : kSkippedSyncvalMessages) { @@ -2238,7 +2238,7 @@ angle::Result RendererVk::initializeDevice(DisplayVk *displayVk, uint32_t queueF { mEnabledDeviceExtensions.push_back(VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME); } - else if (getFeatures().supportsRenderPassStoreOpNoneQCOM.enabled) + else if (getFeatures().supportsRenderPassStoreOpNone.enabled) { mEnabledDeviceExtensions.push_back(VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME); } @@ -3038,7 +3038,7 @@ void RendererVk::initFeatures(DisplayVk *displayVk, ExtensionFound(VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME, deviceExtensionNames)); ANGLE_FEATURE_CONDITION( - &mFeatures, supportsRenderPassStoreOpNoneQCOM, + &mFeatures, supportsRenderPassStoreOpNone, !mFeatures.supportsRenderPassLoadStoreOpNone.enabled && ExtensionFound(VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME, deviceExtensionNames)); @@ -3275,7 +3275,7 @@ void RendererVk::initFeatures(DisplayVk *displayVk, // Android prevents creating swapchain images with VK_FORMAT_R8G8B8_UNORM. // Do this for all platforms, since few (none?) IHVs support 24-bit formats with their HW // natively anyway. - ANGLE_FEATURE_CONDITION(&mFeatures, overrideSurfaceFormatRGB8toRGBA8, true); + ANGLE_FEATURE_CONDITION(&mFeatures, overrideSurfaceFormatRGB8ToRGBA8, true); // http://anglebug.com/6872 // On ARM hardware, framebuffer-fetch-like behavior on Vulkan is already coherent, so we can @@ -3319,7 +3319,7 @@ void RendererVk::initFeatures(DisplayVk *displayVk, ANGLE_FEATURE_CONDITION(&mFeatures, bottomLeftOriginPresentRegionRectangles, IsAndroid()); // Retain debug info in SPIR-V blob. - ANGLE_FEATURE_CONDITION(&mFeatures, retainSpirvDebugInfo, getEnableValidationLayers()); + ANGLE_FEATURE_CONDITION(&mFeatures, retainSPIRVDebugInfo, getEnableValidationLayers()); ANGLE_FEATURE_CONDITION(&mFeatures, generateSPIRVThroughGlslang, kUseSpirvGenThroughGlslang); diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp index 2b33d86789..7fde27a5e7 100644 --- a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp +++ b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp @@ -148,7 +148,7 @@ angle::Result InitImageHelper(DisplayVk *displayVk, angle::FormatID renderableFormatId = vkFormat.getActualRenderableImageFormatID(); // For devices that don't support creating swapchain images with RGB8, emulate with RGBA8. - if (rendererVk->getFeatures().overrideSurfaceFormatRGB8toRGBA8.enabled && + if (rendererVk->getFeatures().overrideSurfaceFormatRGB8ToRGBA8.enabled && renderableFormatId == angle::FormatID::R8G8B8_UNORM) { renderableFormatId = angle::FormatID::R8G8B8A8_UNORM; @@ -1013,7 +1013,7 @@ angle::Result WindowSurfaceVk::initializeImpl(DisplayVk *displayVk) VkFormat nativeFormat = format.getActualRenderableImageVkFormat(); RendererVk *rendererVk = displayVk->getRenderer(); // For devices that don't support creating swapchain images with RGB8, emulate with RGBA8. - if (rendererVk->getFeatures().overrideSurfaceFormatRGB8toRGBA8.enabled && + if (rendererVk->getFeatures().overrideSurfaceFormatRGB8ToRGBA8.enabled && nativeFormat == VK_FORMAT_R8G8B8_UNORM) { nativeFormat = VK_FORMAT_R8G8B8A8_UNORM; @@ -1261,7 +1261,7 @@ angle::Result WindowSurfaceVk::createSwapChain(vk::Context *context, angle::FormatID intendedFormatID = format.getIntendedFormatID(); // For devices that don't support creating swapchain images with RGB8, emulate with RGBA8. - if (renderer->getFeatures().overrideSurfaceFormatRGB8toRGBA8.enabled && + if (renderer->getFeatures().overrideSurfaceFormatRGB8ToRGBA8.enabled && intendedFormatID == angle::FormatID::R8G8B8_UNORM) { actualFormatID = angle::FormatID::R8G8B8A8_UNORM; diff --git a/src/libANGLE/renderer/vulkan/vk_helpers.cpp b/src/libANGLE/renderer/vulkan/vk_helpers.cpp index e75ff8f13c..e2e6fcbb4c 100644 --- a/src/libANGLE/renderer/vulkan/vk_helpers.cpp +++ b/src/libANGLE/renderer/vulkan/vk_helpers.cpp @@ -1128,7 +1128,7 @@ void RenderPassAttachment::finalizeLoadStore(Context *context, context->getRenderer()->getFeatures().supportsRenderPassLoadStoreOpNone.enabled; const bool supportsStoreOpNone = supportsLoadStoreOpNone || - context->getRenderer()->getFeatures().supportsRenderPassStoreOpNoneQCOM.enabled; + context->getRenderer()->getFeatures().supportsRenderPassStoreOpNone.enabled; if (mAccess == ResourceAccess::ReadOnly && supportsStoreOpNone) { if (*storeOp == RenderPassStoreOp::Store && *loadOp != RenderPassLoadOp::Clear) diff --git a/src/tests/egl_tests/EGLFeatureControlTest.cpp b/src/tests/egl_tests/EGLFeatureControlTest.cpp index 83264fb2b0..917f90de38 100644 --- a/src/tests/egl_tests/EGLFeatureControlTest.cpp +++ b/src/tests/egl_tests/EGLFeatureControlTest.cpp @@ -8,6 +8,7 @@ #include <gtest/gtest.h> +#include "common/string_utils.h" #include "libANGLE/Display.h" #include "test_utils/ANGLETest.h" @@ -46,6 +47,9 @@ class EGLFeatureControlTest : public ANGLETest return true; } + + using FeatureNameModifier = std::function<std::string(const std::string &)>; + void testOverrideFeatures(FeatureNameModifier modifyName); }; // Ensure eglQueryStringiANGLE generates EGL_BAD_DISPLAY if the display passed in is invalid. @@ -120,9 +124,7 @@ TEST_P(EGLFeatureControlTest, FeatureCount) ASSERT_EGL_SUCCESS(); } -// Submit a list of features to override when creating the display with eglGetPlatformDisplay, and -// ensure that the features are correctly overridden. -TEST_P(EGLFeatureControlTest, OverrideFeatures) +void EGLFeatureControlTest::testOverrideFeatures(FeatureNameModifier modifyName) { ANGLE_SKIP_TEST_IF(!initTest()); egl::Display *display = static_cast<egl::Display *>(mDisplay); @@ -130,29 +132,38 @@ TEST_P(EGLFeatureControlTest, OverrideFeatures) // Build lists of features to enable/disabled. Toggle features we know are ok to toggle based // from this list. - std::vector<const char *> enabled = std::vector<const char *>(); - std::vector<const char *> disabled = std::vector<const char *>(); - std::vector<bool> shouldBe = std::vector<bool>(); - std::vector<std::string> testedFeatures = { - "add_and_true_to_loop_condition", // Safe to toggle GL - "clamp_frag_depth", // Safe to toggle GL - "clamp_point_size", // Safe to toggle GL and Vulkan - "flip_viewport_y", // Safe to toggle on Vulkan - "zero_max_lod", // Safe to toggle on D3D - "expand_integer_pow_expressions", // Safe to toggle on D3D - "rewrite_unary_minus_operator", // Safe to toggle on D3D + std::vector<const char *> enabled = std::vector<const char *>(); + std::vector<const char *> disabled = std::vector<const char *>(); + std::vector<std::string> modifiedNameStorage = std::vector<std::string>(); + std::vector<bool> shouldBe = std::vector<bool>(); + std::vector<std::string> testedFeatures = { + // Safe to toggle on GL + angle::GetFeatureName(angle::Feature::AddAndTrueToLoopCondition), + angle::GetFeatureName(angle::Feature::ClampFragDepth), + // Safe to toggle on GL and Vulkan + angle::GetFeatureName(angle::Feature::ClampPointSize), + // Safe to toggle on Vulkan + angle::GetFeatureName(angle::Feature::SupportsNegativeViewport), + // Safe to toggle on D3D + angle::GetFeatureName(angle::Feature::ZeroMaxLodWorkaround), + angle::GetFeatureName(angle::Feature::ExpandIntegerPowExpressions), + angle::GetFeatureName(angle::Feature::RewriteUnaryMinusOperator), }; for (size_t i = 0; i < features.size(); i++) { + modifiedNameStorage.push_back(modifyName(features[i]->name)); + } + for (size_t i = 0; i < features.size(); i++) + { bool toggle = std::find(testedFeatures.begin(), testedFeatures.end(), std::string(features[i]->name)) != testedFeatures.end(); if (features[i]->enabled ^ toggle) { - enabled.push_back(features[i]->name); + enabled.push_back(modifiedNameStorage[i].c_str()); } else { - disabled.push_back(features[i]->name); + disabled.push_back(modifiedNameStorage[i].c_str()); } // Save what we expect the feature status will be when checking later. shouldBe.push_back(features[i]->enabled ^ toggle); @@ -181,10 +192,25 @@ TEST_P(EGLFeatureControlTest, OverrideFeatures) for (size_t i = 0; i < features.size(); i++) { EXPECT_STREQ(FeatureStatusToString(shouldBe[i]), - eglQueryStringiANGLE(dpy_override, EGL_FEATURE_STATUS_ANGLE, i)); + eglQueryStringiANGLE(dpy_override, EGL_FEATURE_STATUS_ANGLE, i)) + << modifiedNameStorage[i]; } } +// Submit a list of features to override when creating the display with eglGetPlatformDisplay, and +// ensure that the features are correctly overridden. +TEST_P(EGLFeatureControlTest, OverrideFeatures) +{ + testOverrideFeatures([](const std::string &featureName) { return featureName; }); +} + +// Similar to OverrideFeatures, but ensures that camelCase variants of the name match as well. +TEST_P(EGLFeatureControlTest, OverrideFeaturesCamelCase) +{ + testOverrideFeatures( + [](const std::string &featureName) { return angle::ToCamelCase(featureName); }); +} + ANGLE_INSTANTIATE_TEST(EGLFeatureControlTest, WithNoFixture(ES2_D3D9()), WithNoFixture(ES2_D3D11()), diff --git a/src/tests/gl_tests/BlitFramebufferANGLETest.cpp b/src/tests/gl_tests/BlitFramebufferANGLETest.cpp index 6366af372d..d86a974b53 100644 --- a/src/tests/gl_tests/BlitFramebufferANGLETest.cpp +++ b/src/tests/gl_tests/BlitFramebufferANGLETest.cpp @@ -3478,14 +3478,14 @@ ANGLE_INSTANTIATE_TEST(BlitFramebufferANGLETest, ES3_VULKAN().enable(Feature::EmulatedPrerotation180), ES3_VULKAN().enable(Feature::EmulatedPrerotation270), ES2_METAL(), - ES2_METAL().disable(Feature::HasStencilOutput)); + ES2_METAL().disable(Feature::HasShaderStencilOutput)); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BlitFramebufferTest); ANGLE_INSTANTIATE_TEST_ES3_AND(BlitFramebufferTest, ES3_VULKAN().enable(Feature::EmulatedPrerotation90), ES3_VULKAN().enable(Feature::EmulatedPrerotation180), ES3_VULKAN().enable(Feature::EmulatedPrerotation270), - ES3_METAL().disable(Feature::HasStencilOutput)); + ES3_METAL().disable(Feature::HasShaderStencilOutput)); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BlitFramebufferTestES31); ANGLE_INSTANTIATE_TEST_ES31(BlitFramebufferTestES31); diff --git a/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp b/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp index a5021e3248..3837b27c65 100644 --- a/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp +++ b/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp @@ -73,10 +73,11 @@ class VulkanPerformanceCounterTest : public ANGLETest ASSERT_NE(featureName, nullptr); ASSERT_NE(featureStatus, nullptr); - const bool isStoreOpNoneQCOM = - strcmp(featureName, "supportsRenderPassStoreOpNoneQCOM") == 0; + const bool isStoreOpNone = + strcmp(featureName, GetFeatureName(Feature::SupportsRenderPassStoreOpNone)) == 0; const bool isLoadStoreOpNoneEXT = - strcmp(featureName, "supportsRenderPassLoadStoreOpNone") == 0; + strcmp(featureName, GetFeatureName(Feature::SupportsRenderPassLoadStoreOpNone)) == + 0; const bool isEnabled = strcmp(featureStatus, angle::kFeatureStatusEnabled) == 0; const bool isDisabled = strcmp(featureStatus, angle::kFeatureStatusDisabled) == 0; ASSERT_TRUE(isEnabled || isDisabled); @@ -88,7 +89,7 @@ class VulkanPerformanceCounterTest : public ANGLETest mLoadOpNoneSupport = isSupported; } - if (isStoreOpNoneQCOM || isLoadStoreOpNoneEXT) + if (isStoreOpNone || isLoadStoreOpNoneEXT) { if (mStoreOpNoneSupport == ANGLEFeature::Unknown || mStoreOpNoneSupport == ANGLEFeature::Unsupported) @@ -97,7 +98,8 @@ class VulkanPerformanceCounterTest : public ANGLETest } } - if (strcmp(featureName, "preferDrawClearOverVkCmdClearAttachments") == 0) + if (strcmp(featureName, + GetFeatureName(Feature::PreferDrawClearOverVkCmdClearAttachments)) == 0) { mPreferDrawOverClearAttachments = isSupported; } diff --git a/src/tests/perf_tests/TracePerfTest.cpp b/src/tests/perf_tests/TracePerfTest.cpp index a98d1beade..42b685729c 100644 --- a/src/tests/perf_tests/TracePerfTest.cpp +++ b/src/tests/perf_tests/TracePerfTest.cpp @@ -2068,7 +2068,7 @@ void RegisterTraceTests() if (gTraceTestValidation) { // Enable limits when validating traces because we usually turn off capture. - overrideParams.eglParameters.enable(Feature::CaptureLimits); + overrideParams.eglParameters.enable(Feature::EnableCaptureLimits); // This feature should also be enabled in capture to mirror the replay. overrideParams.eglParameters.enable(Feature::ForceInitShaderVariables); diff --git a/src/tests/test_utils/angle_test_configs.cpp b/src/tests/test_utils/angle_test_configs.cpp index 0ac01c4f6a..9a4c25e9ca 100644 --- a/src/tests/test_utils/angle_test_configs.cpp +++ b/src/tests/test_utils/angle_test_configs.cpp @@ -7,6 +7,7 @@ #include "test_utils/angle_test_configs.h" #include "common/platform.h" +#include "common/string_utils.h" #include "util/util_gl.h" #include <algorithm> @@ -26,7 +27,9 @@ void AppendCapitalizedFeature(std::ostream &stream, Feature feature) return; } - stream << static_cast<char>(std::toupper(name[0])) << (name + 1); + const std::string camelCase = angle::ToCamelCase(name); + + stream << static_cast<char>(std::toupper(camelCase[0])) << (camelCase.c_str() + 1); } bool HasFeatureOverride(const std::vector<Feature> &overrides, Feature feature) diff --git a/util/angle_features_autogen.cpp b/util/angle_features_autogen.cpp index 0d6cf87900..d222eecb20 100644 --- a/util/angle_features_autogen.cpp +++ b/util/angle_features_autogen.cpp @@ -16,193 +16,189 @@ namespace angle namespace { constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{ - {Feature::AddAndTrueToLoopCondition, "add_and_true_to_loop_condition"}, - {Feature::AddBaseVertexToVertexID, "vertex_id_does_not_include_base_vertex"}, - {Feature::AddMockTextureNoRenderTarget, "add_mock_texture_no_render_target"}, - {Feature::AdjustSrcDstRegionBlitFramebuffer, "adjust_src_dst_region_for_blitframebuffer"}, + {Feature::AddAndTrueToLoopCondition, "addAndTrueToLoopCondition"}, + {Feature::AddMockTextureNoRenderTarget, "addMockTextureNoRenderTarget"}, + {Feature::AdjustSrcDstRegionForBlitFramebuffer, "adjustSrcDstRegionForBlitFramebuffer"}, {Feature::AllocateNonZeroMemory, "allocateNonZeroMemory"}, - {Feature::AllowBufferReadWrite, "allow_buffer_read_write"}, - {Feature::AllowClearForRobustResourceInit, "allow_clear_for_robust_resource_init"}, - {Feature::AllowCompressedFormats, "allow_compressed_formats"}, - {Feature::AllowES3OnFL10_0, "allowES3OnFL10_0"}, - {Feature::AllowEtcFormats, "allow_etc_formats"}, - {Feature::AllowGenMultipleMipsPerPass, "gen_multiple_mips_per_pass"}, + {Feature::AllowBufferReadWrite, "allowBufferReadWrite"}, + {Feature::AllowClearForRobustResourceInit, "allowClearForRobustResourceInit"}, + {Feature::AllowCompressedFormats, "allowCompressedFormats"}, + {Feature::AllowES3OnFL100, "allowES3OnFL100"}, + {Feature::AllowETCFormats, "allowETCFormats"}, {Feature::AllowGenerateMipmapWithCompute, "allowGenerateMipmapWithCompute"}, - {Feature::AllowInlineConstVertexData, "allow_inline_const_vertex_data"}, - {Feature::AllowMultisampleStoreAndResolve, "allow_msaa_store_and_resolve"}, - {Feature::AllowRuntimeSamplerCompareMode, "allow_runtime_sampler_compare_mode"}, - {Feature::AllowSamplerCompareGradient, "allow_sampler_compare_gradient"}, - {Feature::AllowSamplerCompareLod, "allow_sampler_compare_lod"}, - {Feature::AllowSeparatedDepthStencilBuffers, "allow_separate_depth_stencil_buffers"}, + {Feature::AllowGenMultipleMipsPerPass, "allowGenMultipleMipsPerPass"}, + {Feature::AllowInlineConstVertexData, "allowInlineConstVertexData"}, + {Feature::AllowMultisampleStoreAndResolve, "allowMultisampleStoreAndResolve"}, + {Feature::AllowRuntimeSamplerCompareMode, "allowRuntimeSamplerCompareMode"}, + {Feature::AllowSamplerCompareGradient, "allowSamplerCompareGradient"}, + {Feature::AllowSamplerCompareLod, "allowSamplerCompareLod"}, + {Feature::AllowSeparateDepthStencilBuffers, "allowSeparateDepthStencilBuffers"}, {Feature::AllowTranslateUniformBlockToStructuredBuffer, - "allow_translate_uniform_block_to_structured_buffer"}, - {Feature::AlwaysCallUseProgramAfterLink, "always_call_use_program_after_link"}, - {Feature::AlwaysUnbindFramebufferTexture2D, "always_unbind_framebuffer_texture_2d"}, + "allowTranslateUniformBlockToStructuredBuffer"}, + {Feature::AlwaysCallUseProgramAfterLink, "alwaysCallUseProgramAfterLink"}, + {Feature::AlwaysUnbindFramebufferTexture2D, "alwaysUnbindFramebufferTexture2D"}, {Feature::AsyncCommandQueue, "asyncCommandQueue"}, - {Feature::Avoid1BitAlphaTextureFormats, "avoid_1_bit_alpha_texture_formats"}, + {Feature::Avoid1BitAlphaTextureFormats, "avoid1BitAlphaTextureFormats"}, {Feature::BasicGLLineRasterization, "basicGLLineRasterization"}, {Feature::BindEmptyForUnusedDescriptorSets, "bindEmptyForUnusedDescriptorSets"}, {Feature::BindTransformFeedbackBufferBeforeBindBufferRange, - "bind_transform_feedback_buffer_before_bind_buffer_range"}, + "bindTransformFeedbackBufferBeforeBindBufferRange"}, {Feature::BottomLeftOriginPresentRegionRectangles, "bottomLeftOriginPresentRegionRectangles"}, {Feature::BresenhamLineRasterization, "bresenhamLineRasterization"}, - {Feature::CallClearTwice, "call_clear_twice"}, - {Feature::CaptureLimits, "enable_capture_limits"}, - {Feature::ClampArrayAccess, "clamp_array_access"}, - {Feature::ClampFragDepth, "clamp_frag_depth"}, - {Feature::ClampMscRate, "clamp_msc_rate"}, - {Feature::ClampPointSize, "clamp_point_size"}, - {Feature::ClearToZeroOrOneBroken, "clear_to_zero_or_one_broken"}, - {Feature::ClipSrcRegionBlitFramebuffer, "clip_src_region_for_blitframebuffer"}, - {Feature::CompressVertexData, "compress_vertex_data"}, + {Feature::CallClearTwice, "callClearTwice"}, + {Feature::ClampArrayAccess, "clampArrayAccess"}, + {Feature::ClampFragDepth, "clampFragDepth"}, + {Feature::ClampMscRate, "clampMscRate"}, + {Feature::ClampPointSize, "clampPointSize"}, + {Feature::ClearToZeroOrOneBroken, "clearToZeroOrOneBroken"}, + {Feature::ClipSrcRegionForBlitFramebuffer, "clipSrcRegionForBlitFramebuffer"}, + {Feature::CompressVertexData, "compressVertexData"}, {Feature::CopyIOSurfaceToNonIOSurfaceForReadOptimization, - "copy_iosurface_to_non_iosurface_for_read_optimization"}, + "copyIOSurfaceToNonIOSurfaceForReadOptimization"}, {Feature::CreatePipelineDuringLink, "createPipelineDuringLink"}, + {Feature::DecodeEncodeSRGBForGenerateMipmap, "decodeEncodeSRGBForGenerateMipmap"}, {Feature::DeferFlushUntilEndRenderPass, "deferFlushUntilEndRenderPass"}, - {Feature::DepthClamping, "depth_clamping"}, - {Feature::DepthStencilBlitExtraCopy, "depth_stencil_blit_extra_copy"}, + {Feature::DepthClamping, "depthClamping"}, + {Feature::DepthStencilBlitExtraCopy, "depthStencilBlitExtraCopy"}, {Feature::DirectMetalGeneration, "directMetalGeneration"}, - {Feature::DisableAnisotropicFiltering, "disable_anisotropic_filtering"}, - {Feature::DisableB5G6R5Support, "disable_b5g6r5_support"}, - {Feature::DisableBlendFuncExtended, "disable_blend_func_extended"}, - {Feature::DisableDrawBuffersIndexed, "disable_draw_buffers_indexed"}, + {Feature::DisableAnisotropicFiltering, "disableAnisotropicFiltering"}, + {Feature::DisableB5G6R5Support, "disableB5G6R5Support"}, + {Feature::DisableBlendFuncExtended, "disableBlendFuncExtended"}, + {Feature::DisableDrawBuffersIndexed, "disableDrawBuffersIndexed"}, {Feature::DisableFifoPresentMode, "disableFifoPresentMode"}, {Feature::DisableFlippingBlitWithCommand, "disableFlippingBlitWithCommand"}, - {Feature::DisableGPUSwitchingSupport, "disable_gpu_switching_support"}, - {Feature::DisableMultisampledRenderToTexture, "disable_mutlisampled_render_to_texture"}, - {Feature::DisableNativeParallelCompile, "disable_native_parallel_compile"}, - {Feature::DisableProgramBinary, "disable_program_binary"}, + {Feature::DisableGPUSwitchingSupport, "disableGPUSwitchingSupport"}, + {Feature::DisableMultisampledRenderToTexture, "disableMultisampledRenderToTexture"}, + {Feature::DisableNativeParallelCompile, "disableNativeParallelCompile"}, + {Feature::DisableProgramBinary, "disableProgramBinary"}, {Feature::DisableProgramCachingForTransformFeedback, - "disable_program_caching_for_transform_feedback"}, - {Feature::DisableSemaphoreFd, "disable_semaphore_fd"}, - {Feature::DisableSyncControlSupport, "disable_sync_control_support"}, - {Feature::DisableTimestampQueries, "disable_timestamp_queries"}, - {Feature::DisableWorkerContexts, "disable_worker_contexts"}, + "disableProgramCachingForTransformFeedback"}, + {Feature::DisableSemaphoreFd, "disableSemaphoreFd"}, + {Feature::DisableSyncControlSupport, "disableSyncControlSupport"}, + {Feature::DisableTimestampQueries, "disableTimestampQueries"}, + {Feature::DisableWorkerContexts, "disableWorkerContexts"}, {Feature::DisallowSeamfulCubeMapEmulation, "disallowSeamfulCubeMapEmulation"}, - {Feature::DoWhileGLSLCausesGPUHang, "do_while_glsl_causes_gpu_hang"}, {Feature::DoesSRGBClearsOnLinearFramebufferAttachments, - "does_srgb_clears_on_linear_framebuffer_attachments"}, - {Feature::DontInitializeUninitializedLocals, "dont_initialize_uninitialized_locals"}, - {Feature::DontRelinkProgramsInParallel, "dont_relink_programs_in_parallel"}, - {Feature::DontUseLoopsToInitializeVariables, "dont_use_loops_to_initialize_variables"}, - {Feature::EmulateAbsIntFunction, "emulate_abs_int_function"}, + "doesSRGBClearsOnLinearFramebufferAttachments"}, + {Feature::DontInitializeUninitializedLocals, "dontInitializeUninitializedLocals"}, + {Feature::DontRelinkProgramsInParallel, "dontRelinkProgramsInParallel"}, + {Feature::DontUseLoopsToInitializeVariables, "dontUseLoopsToInitializeVariables"}, + {Feature::DoWhileGLSLCausesGPUHang, "doWhileGLSLCausesGPUHang"}, + {Feature::EmulateAbsIntFunction, "emulateAbsIntFunction"}, {Feature::EmulateAdvancedBlendEquations, "emulateAdvancedBlendEquations"}, - {Feature::EmulateAtan2Float, "emulate_atan_2_float"}, - {Feature::EmulateCopyTexImage2DFromRenderbuffers, "emulate_copyteximage2d_from_renderbuffers"}, + {Feature::EmulateAtan2Float, "emulateAtan2Float"}, + {Feature::EmulateCopyTexImage2DFromRenderbuffers, "emulateCopyTexImage2DFromRenderbuffers"}, {Feature::EmulateDithering, "emulateDithering"}, - {Feature::EmulateImmutableCompressedTexture3D, "emulate_immutable_compressed_texture_3d"}, - {Feature::EmulateIsnanFloat, "emulate_isnan_float"}, - {Feature::EmulateMaxVertexAttribStride, "emulate_max_vertex_attrib_stride"}, - {Feature::EmulatePackSkipRowsAndPackSkipPixels, "emulate_pack_skip_rows_and_pack_skip_pixels"}, - {Feature::EmulatePrimitiveRestartFixedIndex, "emulate_primitive_restart_fixed_index"}, - {Feature::EmulateR32fImageAtomicExchange, "emulateR32fImageAtomicExchange"}, - {Feature::EmulateRGB10, "emulate_rgb10"}, - {Feature::EmulateTinyStencilTextures, "emulate_tiny_stencil_textures"}, - {Feature::EmulateTransformFeedback, "emulateTransformFeedback"}, {Feature::EmulatedPrerotation180, "emulatedPrerotation180"}, {Feature::EmulatedPrerotation270, "emulatedPrerotation270"}, {Feature::EmulatedPrerotation90, "emulatedPrerotation90"}, + {Feature::EmulateImmutableCompressedTexture3D, "emulateImmutableCompressedTexture3D"}, + {Feature::EmulateIsnanFloat, "emulateIsnanFloat"}, + {Feature::EmulateMaxVertexAttribStride, "emulateMaxVertexAttribStride"}, + {Feature::EmulatePackSkipRowsAndPackSkipPixels, "emulatePackSkipRowsAndPackSkipPixels"}, + {Feature::EmulatePrimitiveRestartFixedIndex, "emulatePrimitiveRestartFixedIndex"}, + {Feature::EmulateR32fImageAtomicExchange, "emulateR32fImageAtomicExchange"}, + {Feature::EmulateRGB10, "emulateRGB10"}, + {Feature::EmulateTinyStencilTextures, "emulateTinyStencilTextures"}, + {Feature::EmulateTransformFeedback, "emulateTransformFeedback"}, + {Feature::EnableCaptureLimits, "enableCaptureLimits"}, {Feature::EnableCompressingPipelineCacheInThreadPool, "enableCompressingPipelineCacheInThreadPool"}, {Feature::EnableMultisampledRenderToTexture, "enableMultisampledRenderToTexture"}, - {Feature::EnablePreRotateSurfaces, "enablePreRotateSurfaces"}, {Feature::EnablePrecisionQualifiers, "enablePrecisionQualifiers"}, + {Feature::EnablePreRotateSurfaces, "enablePreRotateSurfaces"}, {Feature::EnableProgramBinaryForCapture, "enableProgramBinaryForCapture"}, - {Feature::EncodeAndDecodeSRGBForGenerateMipmap, "decode_encode_srgb_for_generatemipmap"}, - {Feature::ExpandIntegerPowExpressions, "expand_integer_pow_expressions"}, + {Feature::ExpandIntegerPowExpressions, "expandIntegerPowExpressions"}, {Feature::ExposeNonConformantExtensionsAndVersions, "exposeNonConformantExtensionsAndVersions"}, - {Feature::FinishDoesNotCauseQueriesToBeAvailable, - "finish_does_not_cause_queries_to_be_available"}, - {Feature::FlushAfterEndingTransformFeedback, "flush_after_ending_transform_feedback"}, - {Feature::FlushBeforeDeleteTextureIfCopiedTo, "flush_before_delete_texture_if_copied_to"}, - {Feature::FlushOnFramebufferChange, "flush_on_framebuffer_change"}, - {Feature::ForceAtomicValueResolution, "force_atomic_value_resolution"}, - {Feature::ForceBufferGPUStorage, "force_buffer_gpu_storage"}, + {Feature::FinishDoesNotCauseQueriesToBeAvailable, "finishDoesNotCauseQueriesToBeAvailable"}, + {Feature::FlushAfterEndingTransformFeedback, "flushAfterEndingTransformFeedback"}, + {Feature::FlushBeforeDeleteTextureIfCopiedTo, "flushBeforeDeleteTextureIfCopiedTo"}, + {Feature::FlushOnFramebufferChange, "flushOnFramebufferChange"}, + {Feature::ForceAtomicValueResolution, "forceAtomicValueResolution"}, + {Feature::ForceBufferGPUStorage, "forceBufferGPUStorage"}, {Feature::ForceD16TexFilter, "forceD16TexFilter"}, - {Feature::ForceD24S8AsUnsupported, "force_d24s8_as_unsupported"}, + {Feature::ForceD24S8AsUnsupported, "forceD24S8AsUnsupported"}, {Feature::ForceDriverUniformOverSpecConst, "forceDriverUniformOverSpecConst"}, {Feature::ForceFallbackFormat, "forceFallbackFormat"}, {Feature::ForceFragmentShaderPrecisionHighpToMediump, "forceFragmentShaderPrecisionHighpToMediump"}, {Feature::ForceInitShaderVariables, "forceInitShaderVariables"}, {Feature::ForceMaxUniformBufferSize16KB, "forceMaxUniformBufferSize16KB"}, - {Feature::ForceNearestFiltering, "force_nearest_filtering"}, + {Feature::ForceNearestFiltering, "forceNearestFiltering"}, {Feature::ForceNearestMipFiltering, "forceNearestMipFiltering"}, - {Feature::ForceNonCSBaseMipmapGeneration, "force_non_cs_mipmap_gen"}, + {Feature::ForceNonCSBaseMipmapGeneration, "forceNonCSBaseMipmapGeneration"}, {Feature::ForceRobustResourceInit, "forceRobustResourceInit"}, {Feature::ForceSubmitImmutableTextureUpdates, "forceSubmitImmutableTextureUpdates"}, - {Feature::ForceTextureLodOffset1, "force_texture_lod_offset_1"}, - {Feature::ForceTextureLodOffset2, "force_texture_lod_offset_2"}, - {Feature::ForceTextureLodOffset3, "force_texture_lod_offset_3"}, - {Feature::ForceTextureLodOffset4, "force_texture_lod_offset_4"}, + {Feature::ForceTextureLodOffset1, "forceTextureLodOffset1"}, + {Feature::ForceTextureLodOffset2, "forceTextureLodOffset2"}, + {Feature::ForceTextureLodOffset3, "forceTextureLodOffset3"}, + {Feature::ForceTextureLodOffset4, "forceTextureLodOffset4"}, {Feature::GenerateSPIRVThroughGlslang, "generateSPIRVThroughGlslang"}, - {Feature::GetDimensionsIgnoresBaseLevel, "get_dimensions_ignores_base_level"}, - {Feature::HasBaseVertexInstancedDraw, "has_base_vertex_instanced_draw"}, - {Feature::HasCheapRenderPass, "has_cheap_render_pass_mtl"}, - {Feature::HasDepthAutoResolve, "has_msaa_depth_auto_resolve"}, - {Feature::HasEvents, "has_mtl_events"}, - {Feature::HasExplicitMemBarrier, "has_explicit_mem_barrier_mtl"}, - {Feature::HasNonUniformDispatch, "has_non_uniform_dispatch"}, - {Feature::HasStencilAutoResolve, "has_msaa_stencil_auto_resolve"}, - {Feature::HasStencilOutput, "has_shader_stencil_output"}, - {Feature::HasTextureSwizzle, "has_texture_swizzle"}, - {Feature::InitFragmentOutputVariables, "init_fragment_output_variables"}, - {Feature::InitializeCurrentVertexAttributes, "initialize_current_vertex_attributes"}, - {Feature::IntelDisableFastMath, "intel_disable_fast_math"}, - {Feature::IntelExplicitBoolCastWorkaround, "intel_explicit_bool_cast_workaround"}, - {Feature::KeepBufferShadowCopy, "keep_buffer_shadow_copy"}, - {Feature::LimitMax3dArrayTextureSizeTo1024, "max_3d_array_texture_size_1024"}, - {Feature::LimitMaxMSAASamplesTo4, "max_msaa_sample_count_4"}, - {Feature::LimitMaxTextureSizeTo4096, "max_texture_size_limit_4096"}, + {Feature::GetDimensionsIgnoresBaseLevel, "getDimensionsIgnoresBaseLevel"}, + {Feature::HasBaseVertexInstancedDraw, "hasBaseVertexInstancedDraw"}, + {Feature::HasCheapRenderPass, "hasCheapRenderPass"}, + {Feature::HasDepthAutoResolve, "hasDepthAutoResolve"}, + {Feature::HasEvents, "hasEvents"}, + {Feature::HasExplicitMemBarrier, "hasExplicitMemBarrier"}, + {Feature::HasNonUniformDispatch, "hasNonUniformDispatch"}, + {Feature::HasShaderStencilOutput, "hasShaderStencilOutput"}, + {Feature::HasStencilAutoResolve, "hasStencilAutoResolve"}, + {Feature::HasTextureSwizzle, "hasTextureSwizzle"}, + {Feature::InitFragmentOutputVariables, "initFragmentOutputVariables"}, + {Feature::InitializeCurrentVertexAttributes, "initializeCurrentVertexAttributes"}, + {Feature::IntelDisableFastMath, "intelDisableFastMath"}, + {Feature::IntelExplicitBoolCastWorkaround, "intelExplicitBoolCastWorkaround"}, + {Feature::KeepBufferShadowCopy, "keepBufferShadowCopy"}, + {Feature::LimitMax3dArrayTextureSizeTo1024, "limitMax3dArrayTextureSizeTo1024"}, + {Feature::LimitMaxMSAASamplesTo4, "limitMaxMSAASamplesTo4"}, + {Feature::LimitMaxTextureSizeTo4096, "limitMaxTextureSizeTo4096"}, {Feature::LogMemoryReportCallbacks, "logMemoryReportCallbacks"}, {Feature::LogMemoryReportStats, "logMemoryReportStats"}, - {Feature::LoseContextOnOutOfMemory, "lose_context_on_out_of_memory"}, - {Feature::MrtPerfWorkaround, "mrt_perf_workaround"}, + {Feature::LoseContextOnOutOfMemory, "loseContextOnOutOfMemory"}, + {Feature::MrtPerfWorkaround, "mrtPerfWorkaround"}, {Feature::MultisampleColorFormatShaderReadWorkaround, - "multisample_color_format_shader_read_workaround"}, - {Feature::OverrideSurfaceFormatRGB8toRGBA8, "overrideSurfaceFormatRGB8toRGBA8"}, - {Feature::PackLastRowSeparatelyForPaddingInclusion, - "pack_last_row_separately_for_padding_inclusion"}, - {Feature::PackOverlappingRowsSeparatelyPackBuffer, - "pack_overlapping_rows_separately_pack_buffer"}, + "multisampleColorFormatShaderReadWorkaround"}, + {Feature::OverrideSurfaceFormatRGB8ToRGBA8, "overrideSurfaceFormatRGB8ToRGBA8"}, + {Feature::PackLastRowSeparatelyForPaddingInclusion, "packLastRowSeparatelyForPaddingInclusion"}, + {Feature::PackOverlappingRowsSeparatelyPackBuffer, "packOverlappingRowsSeparatelyPackBuffer"}, {Feature::PadBuffersToMaxVertexAttribStride, "padBuffersToMaxVertexAttribStride"}, {Feature::PerFrameWindowSizeQuery, "perFrameWindowSizeQuery"}, {Feature::PersistentlyMappedBuffers, "persistentlyMappedBuffers"}, - {Feature::PreAddTexelFetchOffsets, "pre_add_texel_fetch_offsets"}, + {Feature::PreAddTexelFetchOffsets, "preAddTexelFetchOffsets"}, {Feature::PreferAggregateBarrierCalls, "preferAggregateBarrierCalls"}, {Feature::PreferCPUForBufferSubData, "preferCPUForBufferSubData"}, {Feature::PreferDrawClearOverVkCmdClearAttachments, "preferDrawClearOverVkCmdClearAttachments"}, {Feature::PreferSkippingInvalidateForEmulatedFormats, "preferSkippingInvalidateForEmulatedFormats"}, {Feature::PreferSubmitAtFBOBoundary, "preferSubmitAtFBOBoundary"}, - {Feature::PromotePackedFormatsTo8BitPerChannel, "promote_packed_formats_to_8_bit_per_channel"}, + {Feature::PromotePackedFormatsTo8BitPerChannel, "promotePackedFormatsTo8BitPerChannel"}, {Feature::ProvokingVertex, "provokingVertex"}, - {Feature::QueryCounterBitsGeneratesErrors, "query_counter_bits_generates_errors"}, + {Feature::QueryCounterBitsGeneratesErrors, "queryCounterBitsGeneratesErrors"}, {Feature::ReadPixelsUsingImplementationColorReadFormatForNorm16, - "read_pixels_using_implementation_color_read_format"}, + "readPixelsUsingImplementationColorReadFormatForNorm16"}, {Feature::ReapplyUBOBindingsAfterUsingBinaryProgram, - "reapply_ubo_bindings_after_using_binary_program"}, - {Feature::RegenerateStructNames, "regenerate_struct_names"}, - {Feature::RemoveDynamicIndexingOfSwizzledVector, "remove_dynamic_indexing_of_swizzled_vector"}, - {Feature::RemoveInvariantAndCentroidForESSL3, "remove_invarient_and_centroid_for_essl3"}, - {Feature::ResetTexImage2DBaseLevel, "reset_teximage2d_base_level"}, - {Feature::RetainSpirvDebugInfo, "retainSpirvDebugInfo"}, - {Feature::RewriteFloatUnaryMinusOperator, "rewrite_float_unary_minus_operator"}, - {Feature::RewriteRepeatedAssignToSwizzled, "rewrite_repeated_assign_to_swizzled"}, - {Feature::RewriteRowMajorMatrices, "rewrite_row_major_matrices"}, - {Feature::RewriteUnaryMinusOperator, "rewrite_unary_minus_operator"}, - {Feature::RgbDXT1TexturesSampleZeroAlpha, "rgb_dxt1_textures_sample_zero_alpha"}, - {Feature::Rgba4IsNotSupportedForColorRendering, "rgba4_is_not_supported_for_color_rendering"}, - {Feature::SanitizeAmdGpuRendererString, "sanitize_amdgpu_renderer_string"}, - {Feature::ScalarizeVecAndMatConstructorArgs, "scalarize_vec_and_mat_constructor_args"}, - {Feature::SelectViewInGeometryShader, "select_view_in_geometry_shader"}, - {Feature::SetDataFasterThanImageUpload, "set_data_faster_than_image_upload"}, + "reapplyUBOBindingsAfterUsingBinaryProgram"}, + {Feature::RegenerateStructNames, "regenerateStructNames"}, + {Feature::RemoveDynamicIndexingOfSwizzledVector, "removeDynamicIndexingOfSwizzledVector"}, + {Feature::RemoveInvariantAndCentroidForESSL3, "removeInvariantAndCentroidForESSL3"}, + {Feature::ResetTexImage2DBaseLevel, "resetTexImage2DBaseLevel"}, + {Feature::RetainSPIRVDebugInfo, "retainSPIRVDebugInfo"}, + {Feature::RewriteFloatUnaryMinusOperator, "rewriteFloatUnaryMinusOperator"}, + {Feature::RewriteRepeatedAssignToSwizzled, "rewriteRepeatedAssignToSwizzled"}, + {Feature::RewriteRowMajorMatrices, "rewriteRowMajorMatrices"}, + {Feature::RewriteUnaryMinusOperator, "rewriteUnaryMinusOperator"}, + {Feature::RGBA4IsNotSupportedForColorRendering, "RGBA4IsNotSupportedForColorRendering"}, + {Feature::RGBDXT1TexturesSampleZeroAlpha, "RGBDXT1TexturesSampleZeroAlpha"}, + {Feature::SanitizeAMDGPURendererString, "sanitizeAMDGPURendererString"}, + {Feature::ScalarizeVecAndMatConstructorArgs, "scalarizeVecAndMatConstructorArgs"}, + {Feature::SelectViewInGeometryShader, "selectViewInGeometryShader"}, + {Feature::SetDataFasterThanImageUpload, "setDataFasterThanImageUpload"}, {Feature::SetPrimitiveRestartFixedIndexForDrawArrays, - "set_primitive_restart_fixed_index_for_draw_arrays"}, - {Feature::SetZeroLevelBeforeGenerateMipmap, "set_zero_level_before_generating_mipmap"}, + "setPrimitiveRestartFixedIndexForDrawArrays"}, + {Feature::SetZeroLevelBeforeGenerateMipmap, "setZeroLevelBeforeGenerateMipmap"}, {Feature::ShadowBuffers, "shadowBuffers"}, - {Feature::ShiftInstancedArrayDataWithExtraOffset, "shift_instanced_array_data_with_offset"}, - {Feature::SkipVSConstantRegisterZero, "skip_vs_constant_register_zero"}, + {Feature::ShiftInstancedArrayDataWithOffset, "shiftInstancedArrayDataWithOffset"}, + {Feature::SkipVSConstantRegisterZero, "skipVSConstantRegisterZero"}, {Feature::SupportsAndroidHardwareBuffer, "supportsAndroidHardwareBuffer"}, {Feature::SupportsAndroidNativeFenceSync, "supportsAndroidNativeFenceSync"}, {Feature::SupportsBlendOperationAdvanced, "supportsBlendOperationAdvanced"}, @@ -219,8 +215,8 @@ constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{ {Feature::SupportsExternalSemaphoreFd, "supportsExternalSemaphoreFd"}, {Feature::SupportsExternalSemaphoreFuchsia, "supportsExternalSemaphoreFuchsia"}, {Feature::SupportsFilteringPrecision, "supportsFilteringPrecision"}, - {Feature::SupportsGGPFrameToken, "supportsGGPFrameToken"}, {Feature::SupportsGeometryStreamsCapability, "supportsGeometryStreamsCapability"}, + {Feature::SupportsGGPFrameToken, "supportsGGPFrameToken"}, {Feature::SupportsHostQueryReset, "supportsHostQueryReset"}, {Feature::SupportsImageCubeArray, "supportsImageCubeArray"}, {Feature::SupportsImageFormatList, "supportsImageFormatList"}, @@ -234,9 +230,9 @@ constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{ {Feature::SupportsNegativeViewport, "supportsNegativeViewport"}, {Feature::SupportsPipelineStatisticsQuery, "supportsPipelineStatisticsQuery"}, {Feature::SupportsProtectedMemory, "supportsProtectedMemory"}, - {Feature::SupportsRenderPassLoadStoreOpNone, "supportsRenderPassLoadStoreOpNone"}, - {Feature::SupportsRenderPassStoreOpNoneQCOM, "supportsRenderPassStoreOpNoneQCOM"}, {Feature::SupportsRenderpass2, "supportsRenderpass2"}, + {Feature::SupportsRenderPassLoadStoreOpNone, "supportsRenderPassLoadStoreOpNone"}, + {Feature::SupportsRenderPassStoreOpNone, "supportsRenderPassStoreOpNone"}, {Feature::SupportsShaderFloat16, "supportsShaderFloat16"}, {Feature::SupportsShaderFramebufferFetch, "supportsShaderFramebufferFetch"}, {Feature::SupportsShaderFramebufferFetchNonCoherent, @@ -244,30 +240,31 @@ constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{ {Feature::SupportsShaderStencilExport, "supportsShaderStencilExport"}, {Feature::SupportsSharedPresentableImageExtension, "supportsSharedPresentableImageExtension"}, {Feature::SupportsSurfaceCapabilities2Extension, "supportsSurfaceCapabilities2Extension"}, + {Feature::SupportsSurfacelessQueryExtension, "supportsSurfacelessQueryExtension"}, {Feature::SupportsSurfaceProtectedCapabilitiesExtension, "supportsSurfaceProtectedCapabilitiesExtension"}, {Feature::SupportsSurfaceProtectedSwapchains, "supportsSurfaceProtectedSwapchains"}, - {Feature::SupportsSurfacelessQueryExtension, "supportsSurfacelessQueryExtension"}, {Feature::SupportsTransformFeedbackExtension, "supportsTransformFeedbackExtension"}, {Feature::SupportsYUVSamplerConversion, "supportsYUVSamplerConversion"}, {Feature::SwapbuffersOnFlushOrFinishWithSingleBuffer, "swapbuffersOnFlushOrFinishWithSingleBuffer"}, - {Feature::SyncVertexArraysToDefault, "sync_vertex_arrays_to_default"}, - {Feature::UnbindFBOOnContextSwitch, "unbind_fbo_before_switching_context"}, - {Feature::UnfoldShortCircuits, "unfold_short_circuits"}, + {Feature::SyncVertexArraysToDefault, "syncVertexArraysToDefault"}, + {Feature::UnbindFBOBeforeSwitchingContext, "unbindFBOBeforeSwitchingContext"}, + {Feature::UnfoldShortCircuits, "unfoldShortCircuits"}, {Feature::UnpackLastRowSeparatelyForPaddingInclusion, - "unpack_last_row_separately_for_padding_inclusion"}, + "unpackLastRowSeparatelyForPaddingInclusion"}, {Feature::UnpackOverlappingRowsSeparatelyUnpackBuffer, - "unpack_overlapping_rows_separately_unpack_buffer"}, - {Feature::UnsizedsRGBReadPixelsDoesntTransform, "unsized_srgb_read_pixels_doesnt_transform"}, - {Feature::UploadTextureDataInChunks, "chunked_texture_upload"}, - {Feature::UseInstancedPointSpriteEmulation, "use_instanced_point_sprite_emulation"}, + "unpackOverlappingRowsSeparatelyUnpackBuffer"}, + {Feature::UnsizedSRGBReadPixelsDoesntTransform, "unsizedSRGBReadPixelsDoesntTransform"}, + {Feature::UploadTextureDataInChunks, "uploadTextureDataInChunks"}, + {Feature::UseInstancedPointSpriteEmulation, "useInstancedPointSpriteEmulation"}, {Feature::UseMultipleDescriptorsForExternalFormats, "useMultipleDescriptorsForExternalFormats"}, - {Feature::UseSystemMemoryForConstantBuffers, "use_system_memory_for_constant_buffers"}, + {Feature::UseSystemMemoryForConstantBuffers, "useSystemMemoryForConstantBuffers"}, {Feature::UseUnusedBlocksWithStandardOrSharedLayout, - "use_unused_blocks_with_standard_or_shared_layout"}, + "useUnusedBlocksWithStandardOrSharedLayout"}, + {Feature::VertexIDDoesNotIncludeBaseVertex, "vertexIDDoesNotIncludeBaseVertex"}, {Feature::WaitIdleBeforeSwapchainRecreation, "waitIdleBeforeSwapchainRecreation"}, - {Feature::ZeroMaxLodWorkaround, "zero_max_lod"}, + {Feature::ZeroMaxLodWorkaround, "zeroMaxLodWorkaround"}, }}; } // anonymous namespace diff --git a/util/angle_features_autogen.h b/util/angle_features_autogen.h index 300b3bff2d..a0205f5d9c 100644 --- a/util/angle_features_autogen.h +++ b/util/angle_features_autogen.h @@ -17,23 +17,22 @@ namespace angle enum class Feature { AddAndTrueToLoopCondition, - AddBaseVertexToVertexID, AddMockTextureNoRenderTarget, - AdjustSrcDstRegionBlitFramebuffer, + AdjustSrcDstRegionForBlitFramebuffer, AllocateNonZeroMemory, AllowBufferReadWrite, AllowClearForRobustResourceInit, AllowCompressedFormats, - AllowES3OnFL10_0, - AllowEtcFormats, - AllowGenMultipleMipsPerPass, + AllowES3OnFL100, + AllowETCFormats, AllowGenerateMipmapWithCompute, + AllowGenMultipleMipsPerPass, AllowInlineConstVertexData, AllowMultisampleStoreAndResolve, AllowRuntimeSamplerCompareMode, AllowSamplerCompareGradient, AllowSamplerCompareLod, - AllowSeparatedDepthStencilBuffers, + AllowSeparateDepthStencilBuffers, AllowTranslateUniformBlockToStructuredBuffer, AlwaysCallUseProgramAfterLink, AlwaysUnbindFramebufferTexture2D, @@ -45,16 +44,16 @@ enum class Feature BottomLeftOriginPresentRegionRectangles, BresenhamLineRasterization, CallClearTwice, - CaptureLimits, ClampArrayAccess, ClampFragDepth, ClampMscRate, ClampPointSize, ClearToZeroOrOneBroken, - ClipSrcRegionBlitFramebuffer, + ClipSrcRegionForBlitFramebuffer, CompressVertexData, CopyIOSurfaceToNonIOSurfaceForReadOptimization, CreatePipelineDuringLink, + DecodeEncodeSRGBForGenerateMipmap, DeferFlushUntilEndRenderPass, DepthClamping, DepthStencilBlitExtraCopy, @@ -75,16 +74,19 @@ enum class Feature DisableTimestampQueries, DisableWorkerContexts, DisallowSeamfulCubeMapEmulation, - DoWhileGLSLCausesGPUHang, DoesSRGBClearsOnLinearFramebufferAttachments, DontInitializeUninitializedLocals, DontRelinkProgramsInParallel, DontUseLoopsToInitializeVariables, + DoWhileGLSLCausesGPUHang, EmulateAbsIntFunction, EmulateAdvancedBlendEquations, EmulateAtan2Float, EmulateCopyTexImage2DFromRenderbuffers, EmulateDithering, + EmulatedPrerotation180, + EmulatedPrerotation270, + EmulatedPrerotation90, EmulateImmutableCompressedTexture3D, EmulateIsnanFloat, EmulateMaxVertexAttribStride, @@ -94,15 +96,12 @@ enum class Feature EmulateRGB10, EmulateTinyStencilTextures, EmulateTransformFeedback, - EmulatedPrerotation180, - EmulatedPrerotation270, - EmulatedPrerotation90, + EnableCaptureLimits, EnableCompressingPipelineCacheInThreadPool, EnableMultisampledRenderToTexture, - EnablePreRotateSurfaces, EnablePrecisionQualifiers, + EnablePreRotateSurfaces, EnableProgramBinaryForCapture, - EncodeAndDecodeSRGBForGenerateMipmap, ExpandIntegerPowExpressions, ExposeNonConformantExtensionsAndVersions, FinishDoesNotCauseQueriesToBeAvailable, @@ -135,8 +134,8 @@ enum class Feature HasEvents, HasExplicitMemBarrier, HasNonUniformDispatch, + HasShaderStencilOutput, HasStencilAutoResolve, - HasStencilOutput, HasTextureSwizzle, InitFragmentOutputVariables, InitializeCurrentVertexAttributes, @@ -151,7 +150,7 @@ enum class Feature LoseContextOnOutOfMemory, MrtPerfWorkaround, MultisampleColorFormatShaderReadWorkaround, - OverrideSurfaceFormatRGB8toRGBA8, + OverrideSurfaceFormatRGB8ToRGBA8, PackLastRowSeparatelyForPaddingInclusion, PackOverlappingRowsSeparatelyPackBuffer, PadBuffersToMaxVertexAttribStride, @@ -172,21 +171,21 @@ enum class Feature RemoveDynamicIndexingOfSwizzledVector, RemoveInvariantAndCentroidForESSL3, ResetTexImage2DBaseLevel, - RetainSpirvDebugInfo, + RetainSPIRVDebugInfo, RewriteFloatUnaryMinusOperator, RewriteRepeatedAssignToSwizzled, RewriteRowMajorMatrices, RewriteUnaryMinusOperator, - RgbDXT1TexturesSampleZeroAlpha, - Rgba4IsNotSupportedForColorRendering, - SanitizeAmdGpuRendererString, + RGBA4IsNotSupportedForColorRendering, + RGBDXT1TexturesSampleZeroAlpha, + SanitizeAMDGPURendererString, ScalarizeVecAndMatConstructorArgs, SelectViewInGeometryShader, SetDataFasterThanImageUpload, SetPrimitiveRestartFixedIndexForDrawArrays, SetZeroLevelBeforeGenerateMipmap, ShadowBuffers, - ShiftInstancedArrayDataWithExtraOffset, + ShiftInstancedArrayDataWithOffset, SkipVSConstantRegisterZero, SupportsAndroidHardwareBuffer, SupportsAndroidNativeFenceSync, @@ -204,8 +203,8 @@ enum class Feature SupportsExternalSemaphoreFd, SupportsExternalSemaphoreFuchsia, SupportsFilteringPrecision, - SupportsGGPFrameToken, SupportsGeometryStreamsCapability, + SupportsGGPFrameToken, SupportsHostQueryReset, SupportsImageCubeArray, SupportsImageFormatList, @@ -218,32 +217,33 @@ enum class Feature SupportsNegativeViewport, SupportsPipelineStatisticsQuery, SupportsProtectedMemory, - SupportsRenderPassLoadStoreOpNone, - SupportsRenderPassStoreOpNoneQCOM, SupportsRenderpass2, + SupportsRenderPassLoadStoreOpNone, + SupportsRenderPassStoreOpNone, SupportsShaderFloat16, SupportsShaderFramebufferFetch, SupportsShaderFramebufferFetchNonCoherent, SupportsShaderStencilExport, SupportsSharedPresentableImageExtension, SupportsSurfaceCapabilities2Extension, + SupportsSurfacelessQueryExtension, SupportsSurfaceProtectedCapabilitiesExtension, SupportsSurfaceProtectedSwapchains, - SupportsSurfacelessQueryExtension, SupportsTransformFeedbackExtension, SupportsYUVSamplerConversion, SwapbuffersOnFlushOrFinishWithSingleBuffer, SyncVertexArraysToDefault, - UnbindFBOOnContextSwitch, + UnbindFBOBeforeSwitchingContext, UnfoldShortCircuits, UnpackLastRowSeparatelyForPaddingInclusion, UnpackOverlappingRowsSeparatelyUnpackBuffer, - UnsizedsRGBReadPixelsDoesntTransform, + UnsizedSRGBReadPixelsDoesntTransform, UploadTextureDataInChunks, UseInstancedPointSpriteEmulation, UseMultipleDescriptorsForExternalFormats, UseSystemMemoryForConstantBuffers, UseUnusedBlocksWithStandardOrSharedLayout, + VertexIDDoesNotIncludeBaseVertex, WaitIdleBeforeSwapchainRecreation, ZeroMaxLodWorkaround, |