aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLCaps.cpp
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2015-06-24 06:59:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-24 06:59:57 -0700
commitcba99b88fd5fb39def7a094dc32c0745c7a1cfea (patch)
treec2574908e1a63570bbd0eef0689efd7b783ff6a9 /src/gpu/glsl/GrGLSLCaps.cpp
parent1b8e1b5c499e31a671232c8ccb10e778e0d8b154 (diff)
Move GLSL-specific routines/classes to separate glsl directory
The purpose is to begin separating our GLSL-specific code from our GL-specific code, so it can be used with the GL45 platform Review URL: https://codereview.chromium.org/1202293002
Diffstat (limited to 'src/gpu/glsl/GrGLSLCaps.cpp')
-rwxr-xr-xsrc/gpu/glsl/GrGLSLCaps.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLCaps.cpp b/src/gpu/glsl/GrGLSLCaps.cpp
new file mode 100755
index 0000000000..cb72864347
--- /dev/null
+++ b/src/gpu/glsl/GrGLSLCaps.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+#include "GrGLSLCaps.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
+GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) {
+ fDropsTileOnZeroDivide = false;
+ fFBFetchSupport = false;
+ fFBFetchNeedsCustomOutput = false;
+ fBindlessTextureSupport = false;
+ fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction;
+ fFBFetchColorName = NULL;
+ fFBFetchExtensionString = NULL;
+}
+
+SkString GrGLSLCaps::dump() const {
+ SkString r = INHERITED::dump();
+
+ static const char* kAdvBlendEqInteractionStr[] = {
+ "Not Supported",
+ "Automatic",
+ "General Enable",
+ "Specific Enables",
+ };
+ GR_STATIC_ASSERT(0 == kNotSupported_AdvBlendEqInteraction);
+ GR_STATIC_ASSERT(1 == kAutomatic_AdvBlendEqInteraction);
+ GR_STATIC_ASSERT(2 == kGeneralEnable_AdvBlendEqInteraction);
+ GR_STATIC_ASSERT(3 == kSpecificEnables_AdvBlendEqInteraction);
+ GR_STATIC_ASSERT(SK_ARRAY_COUNT(kAdvBlendEqInteractionStr) == kLast_AdvBlendEqInteraction + 1);
+
+ r.appendf("--- GLSL-Specific ---\n");
+
+ r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO"));
+ r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO"));
+ r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO"));
+ r.appendf("Advanced blend equation interaction: %s\n",
+ kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]);
+ return r;
+}
+