Add a tooling flag for path mask caching
Adds the flag and a disables caching on the CCPR bots. Bug: skia: Change-Id: Icb85e77f89634dda1d419dacac5b8a93340723f0 Reviewed-on: https://skia-review.googlesource.com/59740 Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
5b6e6277ad
commit
7a0ebfc033
@ -1140,6 +1140,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
grContextOpts.fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||
grContextOpts.fAllowPathMaskCaching = FLAGS_cachePathMasks;
|
||||
grContextOpts.fExecutor = GpuExecutorForTools();
|
||||
#endif
|
||||
|
||||
|
@ -1341,6 +1341,7 @@ int main(int argc, char** argv) {
|
||||
GrContextOptions grCtxOptions;
|
||||
#if SK_SUPPORT_GPU
|
||||
grCtxOptions.fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||
grCtxOptions.fAllowPathMaskCaching = FLAGS_cachePathMasks;
|
||||
grCtxOptions.fExecutor = GpuExecutorForTools();
|
||||
#endif
|
||||
|
||||
|
@ -678,7 +678,7 @@
|
||||
"--json-output",
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 builder Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_CCPR swarming_bot_id skia-bot-123 swarming_task_id 123456 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value TegraX1 extra_config Android_CCPR model NVIDIA_Shield os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --dont_write pdf --nocpu --pr ccpr --config gl --src tests gm image colorImage svg --blacklist _ svg _ svgparse_ _ test _ GrShape _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --verbose; echo $? >/data/local/tmp/rc",
|
||||
"set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 builder Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_CCPR swarming_bot_id skia-bot-123 swarming_task_id 123456 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value TegraX1 extra_config Android_CCPR model NVIDIA_Shield os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --dont_write pdf --nocpu --pr ccpr --cachePathMasks false --config gl --src tests gm image colorImage svg --blacklist _ svg _ svgparse_ _ test _ GrShape _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --verbose; echo $? >/data/local/tmp/rc",
|
||||
"[START_DIR]/tmp/dm.sh"
|
||||
],
|
||||
"env": {
|
||||
|
@ -678,7 +678,7 @@
|
||||
"--json-output",
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 builder Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_CCPR swarming_bot_id skia-bot-123 swarming_task_id 123456 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Adreno530 extra_config Android_CCPR model PixelXL os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --dont_write pdf --nocpu --pr ccpr --config gles --src tests gm image colorImage svg --blacklist _ svg _ svgparse_ _ test _ GrShape _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --verbose; echo $? >/data/local/tmp/rc",
|
||||
"set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 builder Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_CCPR swarming_bot_id skia-bot-123 swarming_task_id 123456 --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm64 compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Adreno530 extra_config Android_CCPR model PixelXL os Android --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --dont_write pdf --nocpu --pr ccpr --cachePathMasks false --config gles --src tests gm image colorImage svg --blacklist _ svg _ svgparse_ _ test _ GrShape _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --verbose; echo $? >/data/local/tmp/rc",
|
||||
"[START_DIR]/tmp/dm.sh"
|
||||
],
|
||||
"env": {
|
||||
|
@ -227,7 +227,7 @@ def dm_flags(api, bot):
|
||||
# Test coverage counting path renderer.
|
||||
if 'CCPR' in bot:
|
||||
configs = [c for c in configs if c == 'gl' or c == 'gles']
|
||||
args.extend(['--pr', 'ccpr'])
|
||||
args.extend(['--pr', 'ccpr', '--cachePathMasks', 'false'])
|
||||
|
||||
args.append('--config')
|
||||
args.extend(configs)
|
||||
|
@ -858,6 +858,7 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
fBackendOptions.fGrContextOptions.fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||
fBackendOptions.fGrContextOptions.fAllowPathMaskCaching = FLAGS_cachePathMasks;
|
||||
fBackendOptions.fMSAASampleCount = FLAGS_msaa;
|
||||
fBackendOptions.fDeepColor = FLAGS_deepColor;
|
||||
#endif
|
||||
|
@ -87,6 +87,10 @@ DEFINE_bool(deltaAA, kDefaultDeltaAA,
|
||||
|
||||
DEFINE_bool(forceDeltaAA, false, "Force delta anti-aliasing for all paths.");
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
DEFINE_bool(cachePathMasks, true, "Allows path mask textures to be cached in GPU configs.");
|
||||
#endif
|
||||
|
||||
bool CollectImages(SkCommandLineFlags::StringArray images, SkTArray<SkString>* output) {
|
||||
SkASSERT(output);
|
||||
|
||||
|
@ -36,6 +36,9 @@ DECLARE_bool(analyticAA);
|
||||
DECLARE_bool(forceAnalyticAA);
|
||||
DECLARE_bool(deltaAA);
|
||||
DECLARE_bool(forceDeltaAA);
|
||||
#if SK_SUPPORT_GPU
|
||||
DECLARE_bool(cachePathMasks);
|
||||
#endif
|
||||
|
||||
DECLARE_string(key);
|
||||
DECLARE_string(properties);
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "SkGr.h"
|
||||
|
||||
#include "SkCanvas.h"
|
||||
#include "SkCommonFlags.h"
|
||||
#include "SkCommonFlagsPathRenderer.h"
|
||||
#include "SkOSFile.h"
|
||||
#include "SkOSPath.h"
|
||||
@ -277,6 +278,7 @@ int main(int argc, char** argv) {
|
||||
// Create a context.
|
||||
GrContextOptions ctxOptions;
|
||||
ctxOptions.fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||
ctxOptions.fAllowPathMaskCaching = FLAGS_cachePathMasks;
|
||||
sk_gpu_test::GrContextFactory factory(ctxOptions);
|
||||
sk_gpu_test::ContextInfo ctxInfo =
|
||||
factory.getContextInfo(config->getContextType(), config->getContextOverrides());
|
||||
|
@ -140,8 +140,8 @@ static DEFINE_string2(match, m, nullptr,
|
||||
"If a bench does not match any list entry,\n"
|
||||
"it is skipped unless some list entry starts with ~");
|
||||
|
||||
DEFINE_string(slide, "", "Start on this sample.");
|
||||
DEFINE_bool(list, false, "List samples?");
|
||||
static DEFINE_string(slide, "", "Start on this sample.");
|
||||
static DEFINE_bool(list, false, "List samples?");
|
||||
|
||||
#ifdef SK_VULKAN
|
||||
# define BACKENDS_STR "\"sw\", \"gl\", and \"vk\""
|
||||
@ -159,10 +159,11 @@ static DEFINE_string(jpgs, "jpgs", "Directory to read jpgs from.");
|
||||
|
||||
static DEFINE_string2(backend, b, "sw", "Backend to use. Allowed values are " BACKENDS_STR ".");
|
||||
|
||||
DEFINE_int32(msaa, 0, "Number of subpixel samples. 0 for no HW antialiasing.");
|
||||
static DEFINE_int32(msaa, 0, "Number of subpixel samples. 0 for no HW antialiasing.");
|
||||
static DEFINE_bool(cachePathMasks, true, "Allows path mask textures to be cached in GPU configs.");
|
||||
DEFINE_pathrenderer_flag;
|
||||
|
||||
DEFINE_bool(instancedRendering, false, "Enable instanced rendering on GPU backends.");
|
||||
static DEFINE_bool(instancedRendering, false, "Enable instanced rendering on GPU backends.");
|
||||
DECLARE_int32(threads)
|
||||
|
||||
const char* kBackendTypeStrings[sk_app::Window::kBackendTypeCount] = {
|
||||
@ -304,6 +305,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
|
||||
displayParams.fMSAASampleCount = FLAGS_msaa;
|
||||
displayParams.fGrContextOptions.fEnableInstancedRendering = FLAGS_instancedRendering;
|
||||
displayParams.fGrContextOptions.fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||
displayParams.fGrContextOptions.fAllowPathMaskCaching = FLAGS_cachePathMasks;
|
||||
displayParams.fGrContextOptions.fExecutor = GpuExecutorForTools();
|
||||
fWindow->setRequestedDisplayParams(displayParams);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user