Add shared --disableExplicitAlloc flag to tools
Unfortunately, this seems like the best way to have a local bot that uses the old-style allocation. Change-Id: I3124d04bdbd2b262867a620fa467de86fec42d8f Reviewed-on: https://skia-review.googlesource.com/145680 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
e6d0618f67
commit
cb2275bf24
@ -166,6 +166,8 @@ DEFINE_string(pr, "all",
|
||||
"[~]none [~]dashline [~]nvpr [~]ccpr [~]aahairline [~]aaconvex [~]aalinearizing "
|
||||
"[~]small [~]tess] [~]all");
|
||||
|
||||
DEFINE_bool(disableExplicitAlloc, false, "Disable explicit allocation of GPU resources");
|
||||
|
||||
void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
|
||||
static std::unique_ptr<SkExecutor> gGpuExecutor = (0 != FLAGS_gpuThreads)
|
||||
? SkExecutor::MakeFIFOThreadPool(FLAGS_gpuThreads) : nullptr;
|
||||
@ -174,4 +176,10 @@ void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
|
||||
ctxOptions->fSuppressGeometryShaders = FLAGS_noGS;
|
||||
ctxOptions->fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||
ctxOptions->fDisableDriverCorrectnessWorkarounds = FLAGS_disableDriverCorrectnessWorkarounds;
|
||||
|
||||
if (FLAGS_disableExplicitAlloc) {
|
||||
ctxOptions->fExplicitlyAllocateGPUResources = GrContextOptions::Enable::kNo;
|
||||
// Can't have sorting enabled when explicit allocation is disabled.
|
||||
ctxOptions->fSortRenderTargets = GrContextOptions::Enable::kNo;
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ DECLARE_int32(gpuThreads);
|
||||
DECLARE_bool(cachePathMasks);
|
||||
DECLARE_bool(noGS);
|
||||
DECLARE_string(pr);
|
||||
DECLARE_bool(disableExplicitAlloc);
|
||||
|
||||
inline GpuPathRenderers get_named_pathrenderers_flags(const char* name) {
|
||||
if (!strcmp(name, "none")) {
|
||||
|
Loading…
Reference in New Issue
Block a user