@@ -205,6 +205,52 @@ def vulkan_validation_env(build_dir: str) -> typing.Dict[str, str]:
205205 return extra_env
206206
207207
208+ # A small, hand picked set of Vulkan `impeller_unittests` that are run with the
209+ # synchronization validation feature of the Vulkan validation layers enabled.
210+ # Synchronization validation is too expensive to run against the entire suite,
211+ # so these are selected to cover the broadest set of synchronization scenarios
212+ # (blits, readbacks, mipmap generation, MSAA resolves, depth/stencil
213+ # attachments, subpasses, compute, offscreen layers, backdrop filters, advanced
214+ # blends, and glyph atlas uploads).
215+ #
216+ # See https://github.com/flutter/flutter/issues/195502.
217+ VULKAN_SYNC_VALIDATION_TESTS = [
218+ # Blits, readbacks and mipmap generation.
219+ 'Play/BlitPassTest.CanBlitSmallRegionToUninitializedTexture/Vulkan' ,
220+ ## TODO(https://github.com/flutter/flutter/issues/195598):
221+ ## BlitPassVK::ResizeTexture barrier.
222+ # 'Play/BlitPassTest.CanResizeTextures/Vulkan',
223+ ## TODO(https://github.com/flutter/flutter/issues/194987):
224+ ## BlitPassVK::OnCopyTextureToBufferCommand barrier.
225+ # 'Play/RendererTest.CanBlitTextureToBuffer/Vulkan',
226+ ## TODO(https://github.com/flutter/flutter/issues/194987):
227+ ## BlitPassVK::OnGenerateMipmapCommand barrier.
228+ # 'Play/RendererTest.CanGenerateMipmaps/Vulkan',
229+ # Render passes, offscreen targets, MSAA, depth/stencil and subpasses.
230+ ## TODO(https://github.com/flutter/flutter/issues/194987):
231+ ## RenderPassBuilderVK depth/stencil loadOp.
232+ # 'Play/RendererTest.CanRenderToTexture/Vulkan',
233+ 'Play/RendererTest.CanSepiaToneWithSubpasses/Vulkan' ,
234+ 'Play/EntityPassTargetTest.SwapWithMSAAImplicitResolve/Vulkan' ,
235+ # Compute.
236+ 'Compute/ComputeTest.MultiStageInputAndOutput/Vulkan' ,
237+ # End-to-end rendering through Aiks/DisplayList.
238+ ## TODO(https://github.com/flutter/flutter/issues/194987):
239+ ## RenderPassBuilderVK depth/stencil loadOp.
240+ # 'Play/AiksTest.CanRenderImage/Vulkan',
241+ # 'Play/AiksTest.CanRenderClips/Vulkan',
242+ # 'Play/AiksTest.CanRenderTextFrame/Vulkan',
243+ # 'Play/AiksTest.CanRenderBackdropBlur/Vulkan',
244+ # 'Play/AiksTest.CanRenderAdvancedBlendColorFilterWithSaveLayer/Vulkan',
245+ ## TODO(https://github.com/flutter/flutter/issues/194987):
246+ ## RenderPassBuilderVK depth/stencil loadOp.
247+ ## TODO(https://github.com/flutter/flutter/issues/195599):
248+ ## RenderPassBuilderVK depth/stencil storeOp.
249+ # 'Play/AiksTest.CanRenderNestedBackdropBlur/Vulkan',
250+ # 'Play/AiksTest.GaussianBlurBackdropTinyMipMap/Vulkan',
251+ ]
252+
253+
208254def metal_validation_env () -> typing .Dict [str , str ]:
209255 extra_env = {
210256 # pylint: disable=line-too-long
@@ -625,6 +671,35 @@ def make_test(
625671 )
626672
627673
674+ def run_impeller_vulkan_sync_validation_tests (
675+ build_dir : str , build_name : str , executable_filter : typing .Optional [typing .List [str ]],
676+ coverage : bool
677+ ) -> None :
678+ """
679+ Runs `VULKAN_SYNC_VALIDATION_TESTS` with Vulkan synchronization validation.
680+ """
681+ flags = [
682+ '--gtest_filter=' + ':' .join (VULKAN_SYNC_VALIDATION_TESTS ),
683+ '--' ,
684+ '--enable_vulkan_sync_validation' ,
685+ ]
686+ try :
687+ if is_linux ():
688+ xvfb .start_virtual_x (build_name , build_dir )
689+ run_engine_executable (
690+ build_dir ,
691+ 'impeller_unittests' ,
692+ executable_filter ,
693+ flags ,
694+ coverage = coverage ,
695+ gtest = True ,
696+ extra_env = vulkan_validation_env (build_dir ),
697+ )
698+ finally :
699+ if is_linux ():
700+ xvfb .stop_virtual_x (build_name )
701+
702+
628703def run_engine_benchmarks (
629704 build_dir : str , executable_filter : typing .Optional [typing .List [str ]]
630705) -> None :
@@ -1452,6 +1527,9 @@ def main() -> int:
14521527 finally :
14531528 xvfb .stop_virtual_x (build_name )
14541529
1530+ if 'impeller-vulkan-sync-validation' in types :
1531+ run_impeller_vulkan_sync_validation_tests (build_dir , args .variant , engine_filter , args .coverage )
1532+
14551533 if 'dart' in types :
14561534 dart_filter = args .dart_filter .split (',' ) if args .dart_filter else None
14571535 tasks = list (gather_dart_smoke_test (build_dir , dart_filter ))
0 commit comments