Hash :
ac263582
Author :
Date :
2023-06-19T12:26:44
Vulkan: add workaround for VK_EXT_full_screen_exclusive on AMD On outdated (but recent) AMD drivers, the Windows-only Vulkan extension VK_EXT_full_screen_exclusive appeared to be implicitly enabled and set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT mode. Even though ANGLE did not enable or interact with this extension at all, the driver was incorrectly returning VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT error codes on various swapchain operations when the full screen window focus was lost (i.e. alt-tab out and back in). Naturally, ANGLE was not expecting these error codes and did not know how to handle them. Depending on where the errors occurred, ANGLE might crash or retry creating the swapchain repeatedly. Treating the unexpected VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT error code as VK_ERROR_OUT_OF_DATE_KHR/VK_SUBOPTIMAL_KHR was not sufficient, because the driver would repeat the error on every swapchain operation, apparently expecting the error to be handled by a vkAcquireFullScreenExclusiveModeEXT call (even though that would make no sense, since the extension was not enabled). The incorrect driver behavior was reported to AMD and was fixed in recent driver releases. The earliest driver I've tested and know to be working is AMD's Adrenaline driver version 23.5.2 (VkPhysicalDeviceProperties calls this driverVersion 2.0.262/0x800106). The last known bad version was 0x8000e9. The simplest workaround on these older AMD graphics drivers is to explicitly enable the extension, but set it to VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT mode. On newer drivers we do not need to do anything with the extension and can ignore it. Bug: angleproject:8215 Change-Id: I7c58d47a0350f4b0bc1a77f200c1e2f72fcde8d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4627279 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
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 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375
// 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.h: List of ANGLE features to help enable/disable them in tests.
#ifndef ANGLE_SRC_TESTS_TEST_UTIL_AUTOGEN_ANGLE_FEATURES_AUTOGEN_H_
#define ANGLE_SRC_TESTS_TEST_UTIL_AUTOGEN_ANGLE_FEATURES_AUTOGEN_H_
#include "../util_export.h"
namespace angle
{
enum class Feature
{
AddAndTrueToLoopCondition,
AddMockTextureNoRenderTarget,
AdjustSrcDstRegionForBlitFramebuffer,
AllocateNonZeroMemory,
AllowAstcFormats,
AllowBufferReadWrite,
AllowClearForRobustResourceInit,
AllowCompressedFormats,
AllowES3OnFL100,
AllowETCFormats,
AllowGenerateMipmapWithCompute,
AllowGenMultipleMipsPerPass,
AllowInlineConstVertexData,
AllowMultisampleStoreAndResolve,
AllowRenderpassWithoutAttachment,
AllowRuntimeSamplerCompareMode,
AllowSamplerCompareGradient,
AllowSamplerCompareLod,
AllowSeparateDepthStencilBuffers,
AllowTranslateUniformBlockToStructuredBuffer,
AlwaysCallUseProgramAfterLink,
AlwaysPreferStagedTextureUploads,
AlwaysUnbindFramebufferTexture2D,
AlwaysUseManagedStorageModeForBuffers,
AlwaysUseSharedStorageModeForBuffers,
AlwaysUseStagedBufferUpdates,
AppendAliasedMemoryDecorations,
AsyncCommandBufferReset,
AsyncCommandQueue,
Avoid1BitAlphaTextureFormats,
AvoidStencilTextureSwizzle,
BindCompleteFramebufferForTimerQueries,
BindTransformFeedbackBufferBeforeBindBufferRange,
BorderColorSrgb,
BottomLeftOriginPresentRegionRectangles,
BresenhamLineRasterization,
CacheCompiledShader,
CallClearTwice,
ClampArrayAccess,
ClampFragDepth,
ClampMscRate,
ClampPointSize,
ClearToZeroOrOneBroken,
ClipSrcRegionForBlitFramebuffer,
CompileMetalShaders,
CompressVertexData,
CopyIOSurfaceToNonIOSurfaceForReadOptimization,
CopyTextureToBufferForReadOptimization,
DecodeEncodeSRGBForGenerateMipmap,
DeferFlushUntilEndRenderPass,
DepthStencilBlitExtraCopy,
DisableAnisotropicFiltering,
DisableB5G6R5Support,
DisableBaseInstanceVertex,
DisableBlendFuncExtended,
DisableClipControl,
DisableDrawBuffersIndexed,
DisableFlippingBlitWithCommand,
DisableGPUSwitchingSupport,
DisableMetalOnGpuFamily1,
DisableMetalOnNvidia,
DisableMultisampledRenderToTexture,
DisableNativeParallelCompile,
DisableProgramBinary,
DisableProgramCaching,
DisableProgramCachingForTransformFeedback,
DisableProgrammableBlending,
DisableRasterizerOrderViews,
DisableRasterOrderGroups,
DisableRWTextureTier2Support,
DisableSemaphoreFd,
DisableStagedInitializationOfPackedTextureFormats,
DisableSyncControlSupport,
DisableTextureClampToBorder,
DisableTimestampQueries,
DisableWorkerContexts,
DisallowMixedDepthStencilLoadOpNoneAndLoad,
DoesSRGBClearsOnLinearFramebufferAttachments,
DontInitializeUninitializedLocals,
DontRelinkProgramsInParallel,
DontUseLoopsToInitializeVariables,
DoubleDepthBiasConstantFactor,
DoWhileGLSLCausesGPUHang,
DumpShaderSource,
EglColorspaceAttributePassthrough,
EmulateAbsIntFunction,
EmulateAdvancedBlendEquations,
EmulateAlphaToCoverage,
EmulateAtan2Float,
EmulateClipDistanceState,
EmulateCopyTexImage2D,
EmulateCopyTexImage2DFromRenderbuffers,
EmulateDithering,
EmulatedPrerotation180,
EmulatedPrerotation270,
EmulatedPrerotation90,
EmulateImmutableCompressedTexture3D,
EmulateIsnanFloat,
EmulateMaxVertexAttribStride,
EmulatePackSkipRowsAndPackSkipPixels,
EmulatePixelLocalStorage,
EmulatePrimitiveRestartFixedIndex,
EmulateR32fImageAtomicExchange,
EmulateRGB10,
EmulateTinyStencilTextures,
EmulateTransformFeedback,
EnableAsyncPipelineCacheCompression,
EnableCaptureLimits,
EnableInMemoryMtlLibraryCache,
EnableMultisampledRenderToTexture,
EnableParallelMtlLibraryCompilation,
EnablePipelineCacheDataCompression,
EnablePrecisionQualifiers,
EnablePreRotateSurfaces,
EnableProgramBinaryForCapture,
EnableShaderSubstitution,
EnableTimestampQueries,
ExpandIntegerPowExpressions,
ExplicitlyCastMediumpFloatTo16Bit,
ExplicitlyEnablePerSampleShading,
ExposeNonConformantExtensionsAndVersions,
FinishDoesNotCauseQueriesToBeAvailable,
FlushAfterEndingTransformFeedback,
FlushAfterStreamVertexData,
FlushBeforeDeleteTextureIfCopiedTo,
FlushOnFramebufferChange,
ForceAtomicValueResolution,
ForceBufferGPUStorage,
ForceContinuousRefreshOnSharedPresent,
ForceD16TexFilter,
ForceD24S8AsUnsupported,
ForceDepthAttachmentInitOnClear,
ForceDisableFullScreenExclusive,
ForceFallbackFormat,
ForceFragmentShaderPrecisionHighpToMediump,
ForceGlErrorChecking,
ForceInitShaderVariables,
ForceMaxUniformBufferSize16KB,
ForceNearestFiltering,
ForceNearestMipFiltering,
ForceNonCSBaseMipmapGeneration,
ForceRobustResourceInit,
ForceSubmitImmutableTextureUpdates,
ForceTextureLodOffset1,
ForceTextureLodOffset2,
ForceTextureLodOffset3,
ForceTextureLodOffset4,
ForceWaitForSubmissionToCompleteForQueryResult,
GenerateShareableShaders,
GetDimensionsIgnoresBaseLevel,
HasBaseVertexInstancedDraw,
HasCheapRenderPass,
HasDepthAutoResolve,
HasEffectivePipelineCacheSerialization,
HasEvents,
HasExplicitMemBarrier,
HasNonUniformDispatch,
HasShaderStencilOutput,
HasStencilAutoResolve,
HasTextureSwizzle,
InitFragmentOutputVariables,
InitializeCurrentVertexAttributes,
IntelDisableFastMath,
IntelExplicitBoolCastWorkaround,
KeepBufferShadowCopy,
LimitMax3dArrayTextureSizeTo1024,
LimitMaxColorTargetBitsForTesting,
LimitMaxDrawBuffersForTesting,
LimitMaxMSAASamplesTo4,
LimitSampleCountTo2,
LimitWebglMaxTextureSizeTo4096,
LoadMetalShadersFromBlobCache,
LogMemoryReportCallbacks,
LogMemoryReportStats,
LoseContextOnOutOfMemory,
MapUnspecifiedColorSpaceToPassThrough,
MergeProgramPipelineCachesToGlobalCache,
MrtPerfWorkaround,
MultisampleColorFormatShaderReadWorkaround,
MutableMipmapTextureUpload,
OverrideSurfaceFormatRGB8ToRGBA8,
PackLastRowSeparatelyForPaddingInclusion,
PackOverlappingRowsSeparatelyPackBuffer,
PadBuffersToMaxVertexAttribStride,
PassHighpToPackUnormSnormBuiltins,
PerFrameWindowSizeQuery,
PermanentlySwitchToFramebufferFetchMode,
PersistentlyMappedBuffers,
PreAddTexelFetchOffsets,
PreemptivelyStartProvokingVertexCommandBuffer,
PreferAggregateBarrierCalls,
PreferCpuForBuffersubdata,
PreferCPUForBufferSubData,
PreferDeviceLocalMemoryHostVisible,
PreferDrawClearOverVkCmdClearAttachments,
PreferDriverUniformOverSpecConst,
PreferLinearFilterForYUV,
PreferMonolithicPipelinesOverLibraries,
PreferSkippingInvalidateForEmulatedFormats,
PreferSubmitAtFBOBoundary,
PreferSubmitOnAnySamplesPassedQueryEnd,
PrintMetalShaders,
PromotePackedFormatsTo8BitPerChannel,
ProvokingVertex,
QueryCounterBitsGeneratesErrors,
ReadPixelsUsingImplementationColorReadFormatForNorm16,
ReapplyUBOBindingsAfterUsingBinaryProgram,
RegenerateStructNames,
RemoveDynamicIndexingOfSwizzledVector,
RemoveInvariantAndCentroidForESSL3,
ResetTexImage2DBaseLevel,
RetainSPIRVDebugInfo,
RewriteFloatUnaryMinusOperator,
RewriteRepeatedAssignToSwizzled,
RewriteRowMajorMatrices,
RewriteUnaryMinusOperator,
RGBA4IsNotSupportedForColorRendering,
RGBDXT1TexturesSampleZeroAlpha,
RoundOutputAfterDithering,
SanitizeAMDGPURendererString,
ScalarizeVecAndMatConstructorArgs,
SelectViewInGeometryShader,
SetDataFasterThanImageUpload,
SetPrimitiveRestartFixedIndexForDrawArrays,
SetZeroLevelBeforeGenerateMipmap,
ShiftInstancedArrayDataWithOffset,
SingleThreadedTextureDecompression,
SkipVSConstantRegisterZero,
SlowAsyncCommandQueueForTesting,
SlowDownMonolithicPipelineCreationForTesting,
SupportsAndroidHardwareBuffer,
SupportsAndroidNativeFenceSync,
SupportsBindMemory2,
SupportsBlendOperationAdvanced,
SupportsColorWriteEnable,
SupportsComputeTranscodeEtcToBc,
SupportsCustomBorderColor,
SupportsDepthClampZeroOne,
SupportsDepthClipControl,
SupportsDepthClipEnable,
SupportsDepthStencilResolve,
SupportsExtendedDynamicState,
SupportsExtendedDynamicState2,
SupportsExternalFenceCapabilities,
SupportsExternalFenceFd,
SupportsExternalMemoryDmaBufAndModifiers,
SupportsExternalMemoryFd,
SupportsExternalMemoryFuchsia,
SupportsExternalMemoryHost,
SupportsExternalSemaphoreCapabilities,
SupportsExternalSemaphoreFd,
SupportsExternalSemaphoreFuchsia,
SupportsFilteringPrecision,
SupportsFragmentShaderInterlockARB,
SupportsFragmentShaderInterlockNV,
SupportsFragmentShaderOrderingINTEL,
SupportsFragmentShaderPixelInterlock,
SupportsFragmentShadingRate,
SupportsFullScreenExclusive,
SupportsGeometryStreamsCapability,
SupportsGetMemoryRequirements2,
SupportsGGPFrameToken,
SupportsGraphicsPipelineLibrary,
SupportsHostQueryReset,
SupportsImage2dViewOf3d,
SupportsImageCubeArray,
SupportsImageFormatList,
SupportsImagelessFramebuffer,
SupportsIncrementalPresent,
SupportsIndexTypeUint8,
SupportsLegacyDithering,
SupportsLockSurfaceExtension,
SupportsLogicOpDynamicState,
SupportsMemoryBudget,
SupportsMixedReadWriteDepthStencilLayouts,
SupportsMultiDrawIndirect,
SupportsMultisampledRenderToSingleSampled,
SupportsMultisampledRenderToSingleSampledGOOGLEX,
SupportsMultiview,
SupportsNegativeViewport,
SupportsPipelineCreationCacheControl,
SupportsPipelineCreationFeedback,
SupportsPipelineProtectedAccess,
SupportsPipelineRobustness,
SupportsPipelineStatisticsQuery,
SupportsPresentation,
SupportsPrimitivesGeneratedQuery,
SupportsPrimitiveTopologyListRestart,
SupportsProtectedMemory,
SupportsRasterizationOrderAttachmentAccess,
SupportsRenderpass2,
SupportsRenderPassLoadStoreOpNone,
SupportsRenderPassStoreOpNone,
SupportsSampler2dViewOf3d,
SupportsSamplerMirrorClampToEdge,
SupportsShaderFloat16,
SupportsShaderFramebufferFetch,
SupportsShaderFramebufferFetchEXT,
SupportsShaderFramebufferFetchNonCoherent,
SupportsShaderFramebufferFetchNonCoherentEXT,
SupportsShaderPixelLocalStorageEXT,
SupportsShaderStencilExport,
SupportsSharedPresentableImageExtension,
SupportsSurfaceCapabilities2Extension,
SupportsSurfacelessQueryExtension,
SupportsSurfaceProtectedCapabilitiesExtension,
SupportsSurfaceProtectedSwapchains,
SupportsSwapchainMaintenance1,
SupportsTimestampSurfaceAttribute,
SupportsTransformFeedbackExtension,
SupportsVertexInputDynamicState,
SupportsYUVSamplerConversion,
SupportsYuvTarget,
SwapbuffersOnFlushOrFinishWithSingleBuffer,
SyncMonolithicPipelinesToBlobCache,
SyncVertexArraysToDefault,
UnbindFBOBeforeSwitchingContext,
UnfoldShortCircuits,
UnpackLastRowSeparatelyForPaddingInclusion,
UnpackOverlappingRowsSeparatelyUnpackBuffer,
UnsizedSRGBReadPixelsDoesntTransform,
UploadDataToIosurfacesWithStagingBuffers,
UploadTextureDataInChunks,
UseCullModeDynamicState,
UseDepthBiasEnableDynamicState,
UseDepthCompareOpDynamicState,
UseDepthTestEnableDynamicState,
UseDepthWriteEnableDynamicState,
UseFrontFaceDynamicState,
UseInstancedPointSpriteEmulation,
UseMultipleDescriptorsForExternalFormats,
UseNonZeroStencilWriteMaskStaticState,
UsePrimitiveRestartEnableDynamicState,
UseRasterizerDiscardEnableDynamicState,
UseResetCommandBufferBitForSecondaryPools,
UseShadowBuffersWhenAppropriate,
UseStencilOpDynamicState,
UseStencilTestEnableDynamicState,
UseSystemMemoryForConstantBuffers,
UseUnusedBlocksWithStandardOrSharedLayout,
UseVertexInputBindingStrideDynamicState,
UseVmaForImageSuballocation,
VaryingsRequireMatchingPrecisionInSpirv,
VertexIDDoesNotIncludeBaseVertex,
WaitIdleBeforeSwapchainRecreation,
WarmUpPipelineCacheAtLink,
ZeroMaxLodWorkaround,
InvalidEnum,
EnumCount = InvalidEnum,
};
ANGLE_UTIL_EXPORT extern const char *GetFeatureName(Feature feature);
} // namespace angle
#endif // ANGLE_SRC_TESTS_TEST_UTIL_AUTOGEN_ANGLE_FEATURES_AUTOGEN_H_