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 --- docker/README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index c237c61795..41c2a39346 100644 --- a/docker/README.md +++ b/docker/README.md @@ -3,12 +3,35 @@ Docker Docker files for building different Skia targets. -Manual +skia-release ------ +This image is used to build Skia at TOT with SwiftShader. + There is a continuous process that builds this docker image, but if you need to manually push a verison, then run the following commands: docker build -t skia-release ./docker/skia-release/ docker tag skia-release gcr.io/skia-public/skia-release:prod docker push gcr.io/skia-public/skia-release:prod + + +skia-with-swift-shader-base +------ + +This image is used to build a local checkout of Skia with SwiftShader and run the built +executables without requiring the SwiftShader be installed on the host. + +For example (see build-with-swift-shader-and-run for more info), to reproduce a +fuzzer bug in SwiftShader: + + # First, copy the test case into $SKIA_ROOT, say $SKIA_ROOT/skbug_1234 + build-with-swift-shader-and-run "out/with-swift-shader/fuzz -t filter_fuzz -b /skia/skbug_1234" + +There is a continuous process that builds this docker image (which only really changes +if SwiftShader is updated), but if you need to manually push a version, then run the +following commands: + + docker build -t skia-with-swift-shader-base ./docker/skia-with-swift-shader-base/ + docker tag skia-with-swift-shader-base gcr.io/skia-public/skia-with-swift-shader-base:prod + docker push gcr.io/skia-public/skia-with-swift-shader-base:prod \ No newline at end of file -- cgit v1.2.3