aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar ksakamoto <ksakamoto@chromium.org>2016-07-05 03:54:53 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-05 03:54:53 -0700
commitec7f2ac7285ad9b1ea84e7aa68a741ae2a07a777 (patch)
tree3283a77bba8ec1446d0f773c9033835f689fd5d4 /include
parent42e6798696ac3a93a2b7ba7a9d6a84b77eba0116 (diff)
Revert of Begin instanced rendering for simple shapes (patchset #20 id:380001 of https://codereview.chromium.org/2066993003/ )
Reason for revert: This caused static initializer regressions in Chromium (crbug.com/625728). Relevant build logs here: Linux: https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/21849 Mac: https://build.chromium.org/p/chromium/builders/Mac/builds/17350 Relevant lines from the error log: Linux: # InstanceProcessor.cpp GrUniqueKey::GenerateDomain() # InstanceProcessor.cpp gr_instanced::kShapeBufferDomain FAILED linux-release-64/sizes/nacl_helper-si/initializers: actual 8, expected 7, better lower FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Mac: FAILED mac-release/sizes/chrome-si/initializers: actual 2, expected 0, better lower Original issue's description: > Begin instanced rendering for simple shapes > > Adds a module that performs instanced rendering and starts using it > for a select subset of draws on Mac GL platforms. The instance > processor can currently handle rects, ovals, round rects, and double > round rects. It can generalize shapes as round rects in order to > improve batching. The instance processor also employs new drawing > algorithms, irrespective of instanced rendering, that improve GPU-side > performance (e.g. sample mask, different triangle layouts, etc.). > > This change only scratches the surface of instanced rendering. The > majority of draws still only have one instance. Future work may > include: > > * Passing coord transforms through the texel buffer. > * Sending FP uniforms through instanced vertex attribs. > * Using instanced rendering for more draws (stencil writes, > drawAtlas, etc.). > * Adding more shapes to the instance processor’s repertoire. > * Batching draws that have mismatched scissors (analyzing draw > bounds, inserting clip planes, etc.). > * Bindless textures. > * Uber shaders. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003 > > Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891 NOTREECHECKS=true TBR=bsalomon@google.com,egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review-Url: https://codereview.chromium.org/2123693002
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrDrawContext.h2
-rw-r--r--include/private/GrInstancedPipelineInfo.h49
2 files changed, 0 insertions, 51 deletions
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index 96f42693b4..f56570b10b 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -14,7 +14,6 @@
#include "SkRefCnt.h"
#include "SkRegion.h"
#include "SkSurfaceProps.h"
-#include "../private/GrInstancedPipelineInfo.h"
#include "../private/GrSingleOwner.h"
class GrAtlasTextContext;
@@ -347,7 +346,6 @@ private:
GrDrawTarget* fDrawTarget;
SkAutoTDelete<GrAtlasTextContext> fAtlasTextContext;
GrContext* fContext;
- GrInstancedPipelineInfo fInstancedPipelineInfo;
SkSurfaceProps fSurfaceProps;
GrAuditTrail* fAuditTrail;
diff --git a/include/private/GrInstancedPipelineInfo.h b/include/private/GrInstancedPipelineInfo.h
deleted file mode 100644
index f12b89fc6b..0000000000
--- a/include/private/GrInstancedPipelineInfo.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrGrInstancedPipelineInfo_DEFINED
-#define GrGrInstancedPipelineInfo_DEFINED
-
-#include "GrRenderTarget.h"
-
-/**
- * Provides info about the pipeline that GrInstancedRendering needs in order to select appropriate
- * drawing algorithms.
- */
-struct GrInstancedPipelineInfo {
- GrInstancedPipelineInfo(const GrRenderTarget* rt)
- : fIsMultisampled(rt->isStencilBufferMultisampled()),
- fIsMixedSampled(rt->hasMixedSamples()),
- fIsRenderingToFloat(GrPixelConfigIsFloatingPoint(rt->desc().fConfig)),
- fColorDisabled(false),
- fDrawingShapeToStencil(false),
- fCanDiscard(false) {
- }
-
- bool canUseCoverageAA() const {
- return !fIsMultisampled || (fIsMixedSampled && !fDrawingShapeToStencil);
- }
-
- bool fIsMultisampled : 1;
- bool fIsMixedSampled : 1;
- bool fIsRenderingToFloat : 1;
- bool fColorDisabled : 1;
- /**
- * Indicates that the instanced renderer should take extra precautions to ensure the shape gets
- * drawn correctly to the stencil buffer (e.g. no coverage AA). NOTE: this does not mean a
- * stencil test is or is not active.
- */
- bool fDrawingShapeToStencil : 1;
- /**
- * Indicates that the instanced renderer can use processors with discard instructions. This
- * should not be set if the shader will use derivatives, automatic mipmap LOD, or other features
- * that depend on neighboring pixels. Some draws will fail to create if this is not set.
- */
- bool fCanDiscard : 1;
-};
-
-#endif