From fe6b48948cac8b0f8f7185a77c2e6c0d797764a6 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Tue, 5 Jun 2018 17:21:30 -0400 Subject: Add Dockerfile for building and running local Skia checkout with SwiftShader This also adds a little helper to fuzz that allows us to see what GPU is being targeted. This is the first step in getting a SwiftShader fuzz target. To prove that this works, simply download this patch and run: ./docker/skia-with-swift-shader-base/build-with-swift-shader-and-run "out/with-swift-shader/fuzz --gpuInfo -t api -n NativeGLCanvas -b out/with-swift-shader/fiddle" Running supplied command ['out/with-swift-shader/fuzz', '--gpuInfo', '-t', 'api', '-n', 'NativeGLCanvas', '-b', 'out/with-swift-shader/fiddle'] Fuzzing NativeGLCanvas... GL_RENDERER Google SwiftShader GL_VENDOR Google Inc. GL_VERSION OpenGL ES 3.0 SwiftShader 4.0.0.6 Bug: skia: Change-Id: I3cc11a6bcd14f70f6025011722f9a73c94cb1f65 Reviewed-on: https://skia-review.googlesource.com/132269 Reviewed-by: Joe Gregorio Commit-Queue: Kevin Lubick --- fuzz/FuzzCanvas.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fuzz/FuzzCanvas.cpp') diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp index 5c92fd1eb5..b66e5187dd 100644 --- a/fuzz/FuzzCanvas.cpp +++ b/fuzz/FuzzCanvas.cpp @@ -1811,12 +1811,17 @@ static void fuzz_ganesh(Fuzz* fuzz, GrContext* context) { fuzz_canvas(fuzz, surface->getCanvas()); } +extern bool FLAGS_gpuInfo; + DEF_FUZZ(NativeGLCanvas, fuzz) { sk_gpu_test::GrContextFactory f; GrContext* context = f.get(sk_gpu_test::GrContextFactory::kGL_ContextType); if (!context) { context = f.get(sk_gpu_test::GrContextFactory::kGLES_ContextType); } + if (FLAGS_gpuInfo) { + dumpGPUInfo(context); + } fuzz_ganesh(fuzz, context); } -- cgit v1.2.3