Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: src/gpu/GrCaps.cpp

Issue 2182783004: Add test configs for instanced rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test configs for instanced rendering Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrCaps.cpp
diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp
index 36b7b17de2811fe749ca53ebeee2f939dc2d6dbb..fa4230f9fce49b09a9bdb3e926f298099a6e0def 100644
--- a/src/gpu/GrCaps.cpp
+++ b/src/gpu/GrCaps.cpp
@@ -106,6 +106,8 @@ GrCaps::GrCaps(const GrContextOptions& options) {
fUseDrawInsteadOfClear = false;
+ fInstancedSupport = InstancedSupport::kNone;
+
fBlendEquationSupport = kBasic_BlendEquationSupport;
fAdvBlendEqBlacklist = 0;
@@ -123,6 +125,7 @@ GrCaps::GrCaps(const GrContextOptions& options) {
fBufferMapThreshold = options.fBufferMapThreshold;
fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartialRenderTargetWrite;
fUseDrawInsteadOfAllRenderTargetWrites = false;
+ fAvoidInstancedDrawsToFPTargets = false;
fPreferVRAMUseOverFlushes = true;
}
@@ -197,6 +200,21 @@ SkString GrCaps::dump() const {
r.appendf("Max Stencil Sample Count : %d\n", fMaxStencilSampleCount);
r.appendf("Max Raster Samples : %d\n", fMaxRasterSamples);
+ static const char* kInstancedSupportNames[] = {
+ "None",
+ "Basic",
+ "Multisampled",
+ "Mixed Sampled",
+ };
+ GR_STATIC_ASSERT(0 == (int)InstancedSupport::kNone);
+ GR_STATIC_ASSERT(1 == (int)InstancedSupport::kBasic);
+ GR_STATIC_ASSERT(2 == (int)InstancedSupport::kMultisampled);
+ GR_STATIC_ASSERT(3 == (int)InstancedSupport::kMixedSampled);
+ GR_STATIC_ASSERT(4 == SK_ARRAY_COUNT(kInstancedSupportNames));
+
+ r.appendf("Instanced Support : %s\n",
+ kInstancedSupportNames[(int)fInstancedSupport]);
+
static const char* kBlendEquationSupportNames[] = {
"Basic",
"Advanced",
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698