[Graphite] Add support for VulkanTestContext.
This also will allow vulkan graphite to run in dm and nanobench but the
Context always fails to create (since we haven't added all the needed
classes there), so nothing actually runs.
Bug: b/239826392
Change-Id: I8247fe6c7225ad4b264a291baa4915df12a6fc14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/581896
Reviewed-by: Nicolette Prevost <[email protected]>
Commit-Queue: Greg Daniel <[email protected]>
diff --git a/dm/DMGpuTestProcs.cpp b/dm/DMGpuTestProcs.cpp
index 6764734..c02a916 100644
--- a/dm/DMGpuTestProcs.cpp
+++ b/dm/DMGpuTestProcs.cpp
@@ -91,13 +91,15 @@
void RunWithGraphiteTestContexts(GraphiteTestFn* test, Reporter* reporter) {
ContextFactory factory;
+ for (int typeInt = 0; typeInt < ContextFactory::kContextTypeCnt; ++typeInt) {
+ ContextFactory::ContextType contextType = (ContextFactory::ContextType) typeInt;
+ auto [_, context] = factory.getContextInfo(contextType);
+ if (!context) {
+ continue;
+ }
- auto [_, context] = factory.getContextInfo(ContextFactory::ContextType::kMetal);
- if (!context) {
- return;
+ (*test)(reporter, context);
}
-
- (*test)(reporter, context);
}
} // namespace graphite