Hash :
f5f419ec
Author :
Date :
2024-09-04T20:22:20
Vulkan: Add verify-restore in CompressAndStorePipelineCacheVk() Change fixes following problem: When blob cache is full, but still allows to store the current pipeline cache data, storing next chunk may trigger eviction of already stored items. Depending on the blob cache implementation, eviction process may choose to evict chunks from the current pipeline cache data. As the result: blob cache will not contain all chunks. Solution: The `StorePipelineCacheVkChunks()` function now check what chunks exist in the blob cache (if `lastNumStoredChunks` parameter is positive) and restores any missing chunks if their number is less than `lastNumStoredChunks`. First call to `StorePipelineCacheVkChunks()` passes zero (0) to the `lastNumStoredChunks`, which will skip the check and store all chunks unconditionally. If "verifyPipelineCacheInBlobCache" feature is enabled, the `StorePipelineCacheVkChunks()` will be called again to restore possibly missing chunks. If "hasBlobCacheThatEvictsOldItemsFirst" feature is disabled, the function will be called repeatedly in a loop (opposed to only once), until all chunks are present or until number of missing chunk stops decreasing. Bug: angleproject:4722 Change-Id: Ibbbdb2f878d6aafd7ab5586fc654e2b9be900a9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5837042 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.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 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464
// 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,
AdjustClearColorPrecision,
AdjustSrcDstRegionForBlitFramebuffer,
AllocateNonZeroMemory,
AllowAstcFormats,
AllowBufferReadWrite,
AllowClearForRobustResourceInit,
AllowCompressedFormats,
AllowES3OnFL100,
AllowETCFormats,
AllowGenerateMipmapWithCompute,
AllowGenMultipleMipsPerPass,
AllowHostImageCopyDespiteNonIdenticalLayout,
AllowInlineConstVertexData,
AllowMultisampledRenderToTextureEmulation,
AllowMultisampleStoreAndResolve,
AllowRenderpassWithoutAttachment,
AllowRuntimeSamplerCompareMode,
AllowSamplerCompareGradient,
AllowSamplerCompareLod,
AllowSeparateDepthStencilBuffers,
AllowTranslateUniformBlockToStructuredBuffer,
AlwaysCallUseProgramAfterLink,
AlwaysEnableEmulatedMultidrawExtensions,
AlwaysPreferStagedTextureUploads,
AlwaysRunLinkSubJobsThreaded,
AlwaysUnbindFramebufferTexture2D,
AlwaysUseManagedStorageModeForBuffers,
AlwaysUseSharedStorageModeForBuffers,
AlwaysUseStagedBufferUpdates,
AppendAliasedMemoryDecorations,
AsyncCommandBufferResetAndGarbageCleanup,
AsyncCommandQueue,
Avoid1BitAlphaTextureFormats,
AvoidBindFragDataLocation,
AvoidOpSelectWithMismatchingRelaxedPrecision,
AvoidStencilTextureSwizzle,
BgraTexImageFormatsBroken,
BindCompleteFramebufferForTimerQueries,
BindTransformFeedbackBufferBeforeBindBufferRange,
BorderColorSrgb,
BottomLeftOriginPresentRegionRectangles,
BresenhamLineRasterization,
CacheCompiledShader,
CallClearTwice,
ClampArrayAccess,
ClampFragDepth,
ClampMscRate,
ClampPointSize,
ClDumpVkSpirv,
ClearsWithGapsNeedFlush,
ClearToZeroOrOneBroken,
ClipSrcRegionForBlitFramebuffer,
CompileJobIsThreadSafe,
CompileMetalShaders,
CompressVertexData,
CopyIOSurfaceToNonIOSurfaceForReadOptimization,
CopyTextureToBufferForReadOptimization,
CorruptProgramBinaryForTesting,
DecodeEncodeSRGBForGenerateMipmap,
DepthStencilBlitExtraCopy,
DisableAnisotropicFiltering,
DisableB5G6R5Support,
DisableBaseInstanceVertex,
DisableBlendEquationAdvanced,
DisableBlendFuncExtended,
DisableClipControl,
DisableDepthStencilResolveThroughAttachment,
DisableDrawBuffersIndexed,
DisableFlippingBlitWithCommand,
DisableGPUSwitchingSupport,
DisableMetalOnNvidia,
DisableMultisampledRenderToTexture,
DisableNativeParallelCompile,
DisablePipelineCacheLoadForTesting,
DisableProgramBinary,
DisableProgramCaching,
DisableProgramCachingForTransformFeedback,
DisableProgrammableBlending,
DisableRasterizerOrderViews,
DisableRasterOrderGroups,
DisableRenderSnorm,
DisableRWTextureTier2Support,
DisableSemaphoreFd,
DisableSeparateShaderObjects,
DisableStagedInitializationOfPackedTextureFormats,
DisableSyncControlSupport,
DisableTextureClampToBorder,
DisableTextureMirrorClampToEdge,
DisableTiledRendering,
DisableTimestampQueries,
DisallowMixedDepthStencilLoadOpNoneAndLoad,
DoesSRGBClearsOnLinearFramebufferAttachments,
DontInitializeUninitializedLocals,
DontUseLoopsToInitializeVariables,
DoubleDepthBiasConstantFactor,
DoWhileGLSLCausesGPUHang,
DumpShaderSource,
DumpTranslatedShaders,
EglColorspaceAttributePassthrough,
EmulateAbsIntFunction,
EmulateAdvancedBlendEquations,
EmulateAlphaToCoverage,
EmulateAtan2Float,
EmulateClipDistanceState,
EmulateClipOrigin,
EmulateCopyTexImage2D,
EmulateCopyTexImage2DFromRenderbuffers,
EmulateDithering,
EmulateDontCareLoadWithRandomClear,
EmulatedPrerotation180,
EmulatedPrerotation270,
EmulatedPrerotation90,
EmulateImmutableCompressedTexture3D,
EmulateIsnanFloat,
EmulateMaxVertexAttribStride,
EmulatePackSkipRowsAndPackSkipPixels,
EmulatePixelLocalStorage,
EmulatePrimitiveRestartFixedIndex,
EmulateR32fImageAtomicExchange,
EmulateRGB10,
EmulateTinyStencilTextures,
EmulateTransformFeedback,
EnableAdditionalBlendFactorsForDithering,
EnableAsyncPipelineCacheCompression,
EnableCaptureLimits,
EnableInMemoryMtlLibraryCache,
EnableMergeClientAttribBuffer,
EnableMultisampledRenderToTexture,
EnableMultisampledRenderToTextureOnNonTilers,
EnableParallelCompileAndLink,
EnableParallelMtlLibraryCompilation,
EnablePipelineCacheDataCompression,
EnablePortabilityEnumeration,
EnablePrecisionQualifiers,
EnablePreRotateSurfaces,
EnableProgramBinaryForCapture,
EnableShaderSubstitution,
EnableTimestampQueries,
EnableTranslatedShaderSubstitution,
EnsureNonEmptyBufferIsBoundForDraw,
ExpandIntegerPowExpressions,
ExplicitFragmentLocations,
ExplicitlyCastMediumpFloatTo16Bit,
ExplicitlyEnablePerSampleShading,
ExposeNonConformantExtensionsAndVersions,
FinishDoesNotCauseQueriesToBeAvailable,
FlushAfterEndingTransformFeedback,
FlushAfterStreamVertexData,
FlushBeforeDeleteTextureIfCopiedTo,
FlushOnFramebufferChange,
ForceAtomicValueResolution,
ForceBufferGPUStorage,
ForceContinuousRefreshOnSharedPresent,
ForceD16TexFilter,
ForceD24S8AsUnsupported,
ForceDepthAttachmentInitOnClear,
ForceDisableFullScreenExclusive,
ForceFallbackFormat,
ForceFlushAfterDrawcallUsingShadowmap,
ForceFragmentShaderPrecisionHighpToMediump,
ForceGlErrorChecking,
ForceInitShaderVariables,
ForceMaxUniformBufferSize16KB,
ForceMinimumMaxVertexAttributes,
ForceNearestFiltering,
ForceNearestMipFiltering,
ForceNonCSBaseMipmapGeneration,
ForceRobustResourceInit,
ForceSampleUsageForAhbBackedImages,
ForceSubmitImmutableTextureUpdates,
ForceTextureLodOffset1,
ForceTextureLodOffset2,
ForceTextureLodOffset3,
ForceTextureLodOffset4,
ForceWaitForSubmissionToCompleteForQueryResult,
GenerateFragmentShadingRateAttchementWithCpu,
GenerateShareableShaders,
GetDimensionsIgnoresBaseLevel,
HasBaseVertexInstancedDraw,
HasBlobCacheThatEvictsOldItemsFirst,
HasCheapRenderPass,
HasDepthAutoResolve,
HasEffectivePipelineCacheSerialization,
HasEvents,
HasExplicitMemBarrier,
HasNonUniformDispatch,
HasShaderStencilOutput,
HasStencilAutoResolve,
HasTextureSwizzle,
InitFragmentOutputVariables,
InitializeCurrentVertexAttributes,
InjectAsmStatementIntoLoopBodies,
IntelDisableFastMath,
IntelExplicitBoolCastWorkaround,
KeepBufferShadowCopy,
LimitMax3dArrayTextureSizeTo1024,
LimitMaxColorTargetBitsForTesting,
LimitMaxDrawBuffersForTesting,
LimitMaxMSAASamplesTo4,
LimitMaxStorageBufferSize,
LimitSampleCountTo2,
LimitWebglMaxTextureSizeTo4096,
LimitWebglMaxTextureSizeTo8192,
LinkJobIsThreadSafe,
LoadMetalShadersFromBlobCache,
LogMemoryReportCallbacks,
LogMemoryReportStats,
LoseContextOnOutOfMemory,
MapUnspecifiedColorSpaceToPassThrough,
MergeProgramPipelineCachesToGlobalCache,
MrtPerfWorkaround,
MultisampleColorFormatShaderReadWorkaround,
MutableMipmapTextureUpload,
OverrideSurfaceFormatRGB8ToRGBA8,
PackLastRowSeparatelyForPaddingInclusion,
PackOverlappingRowsSeparatelyPackBuffer,
PadBuffersToMaxVertexAttribStride,
PassHighpToPackUnormSnormBuiltins,
PerFrameWindowSizeQuery,
PermanentlySwitchToFramebufferFetchMode,
PersistentlyMappedBuffers,
PreAddTexelFetchOffsets,
PreemptivelyStartProvokingVertexCommandBuffer,
PreferAggregateBarrierCalls,
PreferCachedNoncoherentForDynamicStreamBufferUsage,
PreferCpuForBuffersubdata,
PreferCPUForBufferSubData,
PreferDeviceLocalMemoryHostVisible,
PreferDoubleBufferSwapchainOnFifoMode,
PreferDrawClearOverVkCmdClearAttachments,
PreferDriverUniformOverSpecConst,
PreferDynamicRendering,
PreferHostCachedForNonStaticBufferUsage,
PreferLinearFilterForYUV,
PreferMonolithicPipelinesOverLibraries,
PreferMSRTSSFlagByDefault,
PreferSkippingInvalidateForEmulatedFormats,
PreferSubmitAtFBOBoundary,
PreferSubmitOnAnySamplesPassedQueryEnd,
PreTransformTextureCubeGradDerivatives,
PrintMetalShaders,
PromotePackedFormatsTo8BitPerChannel,
ProvokingVertex,
QueryCounterBitsGeneratesErrors,
ReadPixelsUsingImplementationColorReadFormatForNorm16,
ReapplyUBOBindingsAfterUsingBinaryProgram,
RegenerateStructNames,
RejectWebglShadersWithUndefinedBehavior,
RemoveDynamicIndexingOfSwizzledVector,
RemoveInvariantAndCentroidForESSL3,
RequireGpuFamily2,
RescopeGlobalVariables,
ResetTexImage2DBaseLevel,
ResyncDepthRangeOnClipControl,
RetainSPIRVDebugInfo,
RewriteFloatUnaryMinusOperator,
RewriteRepeatedAssignToSwizzled,
RewriteRowMajorMatrices,
RewriteUnaryMinusOperator,
RGBA4IsNotSupportedForColorRendering,
RGBDXT1TexturesSampleZeroAlpha,
RoundOutputAfterDithering,
SanitizeAMDGPURendererString,
ScalarizeVecAndMatConstructorArgs,
SelectViewInGeometryShader,
SetDataFasterThanImageUpload,
SetPrimitiveRestartFixedIndexForDrawArrays,
SetZeroLevelBeforeGenerateMipmap,
ShiftInstancedArrayDataWithOffset,
SingleThreadedTextureDecompression,
SkipVSConstantRegisterZero,
SlowAsyncCommandQueueForTesting,
SlowDownMonolithicPipelineCreationForTesting,
SrgbBlendingBroken,
Supports16BitInputOutput,
Supports16BitPushConstant,
Supports16BitStorageBuffer,
Supports16BitUniformAndStorageBuffer,
Supports8BitPushConstant,
Supports8BitStorageBuffer,
Supports8BitUniformAndStorageBuffer,
SupportsAndroidHardwareBuffer,
SupportsAndroidNativeFenceSync,
SupportsBindMemory2,
SupportsBlendOperationAdvanced,
SupportsBlendOperationAdvancedCoherent,
SupportsColorWriteEnable,
SupportsComputeTranscodeEtcToBc,
SupportsCustomBorderColor,
SupportsDenormFtzFp16,
SupportsDenormFtzFp32,
SupportsDenormFtzFp64,
SupportsDenormPreserveFp16,
SupportsDenormPreserveFp32,
SupportsDenormPreserveFp64,
SupportsDepthClampZeroOne,
SupportsDepthClipControl,
SupportsDepthStencilIndependentResolveNone,
SupportsDepthStencilResolve,
SupportsDynamicRendering,
SupportsDynamicRenderingLocalRead,
SupportsExtendedDynamicState,
SupportsExtendedDynamicState2,
SupportsExternalFenceCapabilities,
SupportsExternalFenceFd,
SupportsExternalFormatResolve,
SupportsExternalMemoryDmaBufAndModifiers,
SupportsExternalMemoryFd,
SupportsExternalMemoryFuchsia,
SupportsExternalMemoryHost,
SupportsExternalSemaphoreCapabilities,
SupportsExternalSemaphoreFd,
SupportsExternalSemaphoreFuchsia,
SupportsFormatFeatureFlags2,
SupportsFoveatedRendering,
SupportsFragmentShaderInterlockARB,
SupportsFragmentShaderInterlockNV,
SupportsFragmentShaderOrderingINTEL,
SupportsFragmentShaderPixelInterlock,
SupportsFragmentShadingRate,
SupportsFullScreenExclusive,
SupportsGeometryStreamsCapability,
SupportsGetMemoryRequirements2,
SupportsGGPFrameToken,
SupportsGraphicsPipelineLibrary,
SupportsHostImageCopy,
SupportsHostQueryReset,
SupportsImage2dViewOf3d,
SupportsImageCubeArray,
SupportsImageFormatList,
SupportsImagelessFramebuffer,
SupportsIncrementalPresent,
SupportsIndexTypeUint8,
SupportsLegacyDithering,
SupportsLockSurfaceExtension,
SupportsLogicOpDynamicState,
SupportsMaintenance5,
SupportsMemoryBudget,
SupportsMixedReadWriteDepthStencilLayouts,
SupportsMultiDrawIndirect,
SupportsMultisampledRenderToSingleSampled,
SupportsMultiview,
SupportsNonConstantLoopIndexing,
SupportsPipelineCreationFeedback,
SupportsPipelineProtectedAccess,
SupportsPipelineRobustness,
SupportsPipelineStatisticsQuery,
SupportsPortabilityEnumeration,
SupportsPresentation,
SupportsPrimitivesGeneratedQuery,
SupportsPrimitiveTopologyListRestart,
SupportsProtectedMemory,
SupportsRasterizationOrderAttachmentAccess,
SupportsRenderpass2,
SupportsRenderPassLoadStoreOpNone,
SupportsRenderPassStoreOpNone,
SupportsRoundingModeRteFp16,
SupportsRoundingModeRteFp32,
SupportsRoundingModeRteFp64,
SupportsRoundingModeRtzFp16,
SupportsRoundingModeRtzFp32,
SupportsRoundingModeRtzFp64,
SupportsSampler2dViewOf3d,
SupportsSamplerMirrorClampToEdge,
SupportsShaderFloat16,
SupportsShaderFloat64,
SupportsShaderFramebufferFetch,
SupportsShaderFramebufferFetchEXT,
SupportsShaderFramebufferFetchNonCoherent,
SupportsShaderFramebufferFetchNonCoherentEXT,
SupportsShaderInt8,
SupportsShaderNonSemanticInfo,
SupportsShaderPixelLocalStorageEXT,
SupportsShaderStencilExport,
SupportsSharedPresentableImageExtension,
SupportsSignedZeroInfNanPreserveFp16,
SupportsSignedZeroInfNanPreserveFp32,
SupportsSignedZeroInfNanPreserveFp64,
SupportsSPIRV14,
SupportsSurfaceCapabilities2Extension,
SupportsSurfacelessQueryExtension,
SupportsSurfaceMaintenance1,
SupportsSurfaceProtectedCapabilitiesExtension,
SupportsSurfaceProtectedSwapchains,
SupportsSwapchainMaintenance1,
SupportsSynchronization2,
SupportsTimelineSemaphore,
SupportsTimestampSurfaceAttribute,
SupportsTransformFeedbackExtension,
SupportsVertexInputDynamicState,
SupportsYUVSamplerConversion,
SupportsYuvTarget,
SwapbuffersOnFlushOrFinishWithSingleBuffer,
SyncAllVertexArraysToDefault,
SyncDefaultVertexArraysToDefault,
SyncMonolithicPipelinesToBlobCache,
UnbindFBOBeforeSwitchingContext,
UncurrentEglSurfaceUponSurfaceDestroy,
UnfoldShortCircuits,
UnpackLastRowSeparatelyForPaddingInclusion,
UnpackOverlappingRowsSeparatelyUnpackBuffer,
UnsizedSRGBReadPixelsDoesntTransform,
UploadDataToIosurfacesWithStagingBuffers,
UploadTextureDataInChunks,
UseCullModeDynamicState,
UseDepthBiasEnableDynamicState,
UseDepthCompareOpDynamicState,
UseDepthTestEnableDynamicState,
UseDepthWriteEnableDynamicState,
UseDualPipelineBlobCacheSlots,
UseEmptyBlobsToEraseOldPipelineCacheFromBlobCache,
UseFrontFaceDynamicState,
UseIntermediateTextureForGenerateMipmap,
UseMultipleDescriptorsForExternalFormats,
UseNonZeroStencilWriteMaskStaticState,
UsePrimitiveRestartEnableDynamicState,
UseRasterizerDiscardEnableDynamicState,
UseResetCommandBufferBitForSecondaryPools,
UseShadowBuffersWhenAppropriate,
UseStencilOpDynamicState,
UseStencilTestEnableDynamicState,
UseSystemMemoryForConstantBuffers,
UseUnusedBlocksWithStandardOrSharedLayout,
UseVertexInputBindingStrideDynamicState,
UseVkEventForImageBarrier,
UseVmaForImageSuballocation,
VaryingsRequireMatchingPrecisionInSpirv,
VerifyPipelineCacheInBlobCache,
VertexIDDoesNotIncludeBaseVertex,
WaitIdleBeforeSwapchainRecreation,
WarmUpPipelineCacheAtLink,
WrapSwitchInIfTrue,
WriteHelperSampleMask,
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_