Hash :
c5271e8e
Author :
Date :
2022-04-04T23:28:35
Vulkan: Emulate GL_KHR_blend_equation_advanced Based on a change by Brandon Schade <b.schade@samsung.com> In the translator, when advanced blend is enabled, an input attachment is added. Based on the listed advanced blend equations, emulation code is added that performs those equations' functions. The blend equation itself is passed through a driver uniform. Note that the advanced blend extension only allows a single output to use advanced blend, and that should be at location 0. In the Vulkan backend, when advanced blend is used, the driver uniform to select the equation is updated and normal blending is disabled. Bug: angleproject:3586 Change-Id: Icc42e8be238d34fca149087eb9cfe616a7643a6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3575738 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_features.py using data from *_features.json.
//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// angle_features_autogen.cpp: List of ANGLE features to help enable/disable them in tests.
#include "angle_features_autogen.h"
#include "common/PackedEnums.h"
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::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::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::AllowTranslateUniformBlockToStructuredBuffer,
"allow_translate_uniform_block_to_structured_buffer"},
{Feature::AlwaysCallUseProgramAfterLink, "always_call_use_program_after_link"},
{Feature::AlwaysUnbindFramebufferTexture2D, "always_unbind_framebuffer_texture_2d"},
{Feature::AsyncCommandQueue, "asyncCommandQueue"},
{Feature::Avoid1BitAlphaTextureFormats, "avoid_1_bit_alpha_texture_formats"},
{Feature::BasicGLLineRasterization, "basicGLLineRasterization"},
{Feature::BindEmptyForUnusedDescriptorSets, "bindEmptyForUnusedDescriptorSets"},
{Feature::BindTransformFeedbackBufferBeforeBindBufferRange,
"bind_transform_feedback_buffer_before_bind_buffer_range"},
{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::CreatePipelineDuringLink, "createPipelineDuringLink"},
{Feature::DeferFlushUntilEndRenderPass, "deferFlushUntilEndRenderPass"},
{Feature::DepthClamping, "depth_clamping"},
{Feature::DepthStencilBlitExtraCopy, "depth_stencil_blit_extra_copy"},
{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::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::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"},
{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"},
{Feature::EmulateAdvancedBlendEquations, "emulateAdvancedBlendEquations"},
{Feature::EmulateAtan2Float, "emulate_atan_2_float"},
{Feature::EmulateCopyTexImage2DFromRenderbuffers, "emulate_copyteximage2d_from_renderbuffers"},
{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::EnableCompressingPipelineCacheInThreadPool,
"enableCompressingPipelineCacheInThreadPool"},
{Feature::EnableMultisampledRenderToTexture, "enableMultisampledRenderToTexture"},
{Feature::EnablePreRotateSurfaces, "enablePreRotateSurfaces"},
{Feature::EnablePrecisionQualifiers, "enablePrecisionQualifiers"},
{Feature::EnableProgramBinaryForCapture, "enableProgramBinaryForCapture"},
{Feature::EncodeAndDecodeSRGBForGenerateMipmap, "decode_encode_srgb_for_generatemipmap"},
{Feature::ExpandIntegerPowExpressions, "expand_integer_pow_expressions"},
{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::ForceD16TexFilter, "forceD16TexFilter"},
{Feature::ForceD24S8AsUnsupported, "force_d24s8_as_unsupported"},
{Feature::ForceDriverUniformOverSpecConst, "forceDriverUniformOverSpecConst"},
{Feature::ForceFallbackFormat, "forceFallbackFormat"},
{Feature::ForceFragmentShaderPrecisionHighpToMediump,
"forceFragmentShaderPrecisionHighpToMediump"},
{Feature::ForceInitShaderVariables, "forceInitShaderVariables"},
{Feature::ForceMaxUniformBufferSize16KB, "forceMaxUniformBufferSize16KB"},
{Feature::ForceNearestFiltering, "force_nearest_filtering"},
{Feature::ForceNearestMipFiltering, "forceNearestMipFiltering"},
{Feature::ForceNonCSBaseMipmapGeneration, "force_non_cs_mipmap_gen"},
{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::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::LogMemoryReportCallbacks, "logMemoryReportCallbacks"},
{Feature::LogMemoryReportStats, "logMemoryReportStats"},
{Feature::LoseContextOnOutOfMemory, "lose_context_on_out_of_memory"},
{Feature::MrtPerfWorkaround, "mrt_perf_workaround"},
{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"},
{Feature::PadBuffersToMaxVertexAttribStride, "padBuffersToMaxVertexAttribStride"},
{Feature::PerFrameWindowSizeQuery, "perFrameWindowSizeQuery"},
{Feature::PersistentlyMappedBuffers, "persistentlyMappedBuffers"},
{Feature::PreAddTexelFetchOffsets, "pre_add_texel_fetch_offsets"},
{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::ProvokingVertex, "provokingVertex"},
{Feature::QueryCounterBitsGeneratesErrors, "query_counter_bits_generates_errors"},
{Feature::ReadPixelsUsingImplementationColorReadFormatForNorm16,
"read_pixels_using_implementation_color_read_format"},
{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"},
{Feature::SetPrimitiveRestartFixedIndexForDrawArrays,
"set_primitive_restart_fixed_index_for_draw_arrays"},
{Feature::SetZeroLevelBeforeGenerateMipmap, "set_zero_level_before_generating_mipmap"},
{Feature::ShadowBuffers, "shadowBuffers"},
{Feature::ShiftInstancedArrayDataWithExtraOffset, "shift_instanced_array_data_with_offset"},
{Feature::SkipVSConstantRegisterZero, "skip_vs_constant_register_zero"},
{Feature::SupportsAndroidHardwareBuffer, "supportsAndroidHardwareBuffer"},
{Feature::SupportsAndroidNativeFenceSync, "supportsAndroidNativeFenceSync"},
{Feature::SupportsBlendOperationAdvanced, "supportsBlendOperationAdvanced"},
{Feature::SupportsCustomBorderColor, "supportsCustomBorderColor"},
{Feature::SupportsDepthClipControl, "supportsDepthClipControl"},
{Feature::SupportsDepthStencilResolve, "supportsDepthStencilResolve"},
{Feature::SupportsExternalFenceCapabilities, "supportsExternalFenceCapabilities"},
{Feature::SupportsExternalFenceFd, "supportsExternalFenceFd"},
{Feature::SupportsExternalMemoryDmaBufAndModifiers, "supportsExternalMemoryDmaBufAndModifiers"},
{Feature::SupportsExternalMemoryFd, "supportsExternalMemoryFd"},
{Feature::SupportsExternalMemoryFuchsia, "supportsExternalMemoryFuchsia"},
{Feature::SupportsExternalMemoryHost, "supportsExternalMemoryHost"},
{Feature::SupportsExternalSemaphoreCapabilities, "supportsExternalSemaphoreCapabilities"},
{Feature::SupportsExternalSemaphoreFd, "supportsExternalSemaphoreFd"},
{Feature::SupportsExternalSemaphoreFuchsia, "supportsExternalSemaphoreFuchsia"},
{Feature::SupportsFilteringPrecision, "supportsFilteringPrecision"},
{Feature::SupportsGGPFrameToken, "supportsGGPFrameToken"},
{Feature::SupportsGeometryStreamsCapability, "supportsGeometryStreamsCapability"},
{Feature::SupportsHostQueryReset, "supportsHostQueryReset"},
{Feature::SupportsImageCubeArray, "supportsImageCubeArray"},
{Feature::SupportsImageFormatList, "supportsImageFormatList"},
{Feature::SupportsIncrementalPresent, "supportsIncrementalPresent"},
{Feature::SupportsIndexTypeUint8, "supportsIndexTypeUint8"},
{Feature::SupportsLockSurfaceExtension, "supportsLockSurfaceExtension"},
{Feature::SupportsMultiDrawIndirect, "supportsMultiDrawIndirect"},
{Feature::SupportsMultisampledRenderToSingleSampled,
"supportsMultisampledRenderToSingleSampled"},
{Feature::SupportsMultiview, "supportsMultiview"},
{Feature::SupportsNegativeViewport, "supportsNegativeViewport"},
{Feature::SupportsPipelineStatisticsQuery, "supportsPipelineStatisticsQuery"},
{Feature::SupportsProtectedMemory, "supportsProtectedMemory"},
{Feature::SupportsRenderPassLoadStoreOpNone, "supportsRenderPassLoadStoreOpNone"},
{Feature::SupportsRenderPassStoreOpNoneQCOM, "supportsRenderPassStoreOpNoneQCOM"},
{Feature::SupportsRenderpass2, "supportsRenderpass2"},
{Feature::SupportsShaderFloat16, "supportsShaderFloat16"},
{Feature::SupportsShaderFramebufferFetch, "supportsShaderFramebufferFetch"},
{Feature::SupportsShaderFramebufferFetchNonCoherent,
"supportsShaderFramebufferFetchNonCoherent"},
{Feature::SupportsShaderStencilExport, "supportsShaderStencilExport"},
{Feature::SupportsSharedPresentableImageExtension, "supportsSharedPresentableImageExtension"},
{Feature::SupportsSurfaceCapabilities2Extension, "supportsSurfaceCapabilities2Extension"},
{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::UnpackLastRowSeparatelyForPaddingInclusion,
"unpack_last_row_separately_for_padding_inclusion"},
{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"},
{Feature::UseMultipleDescriptorsForExternalFormats, "useMultipleDescriptorsForExternalFormats"},
{Feature::UseSystemMemoryForConstantBuffers, "use_system_memory_for_constant_buffers"},
{Feature::UseUnusedBlocksWithStandardOrSharedLayout,
"use_unused_blocks_with_standard_or_shared_layout"},
{Feature::WaitIdleBeforeSwapchainRecreation, "waitIdleBeforeSwapchainRecreation"},
{Feature::ZeroMaxLodWorkaround, "zero_max_lod"},
}};
} // anonymous namespace
const char *GetFeatureName(Feature feature)
{
return kFeatureNames[feature];
}
} // namespace angle