OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2012 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 |
| 9 #include "GrGLSLCaps.h" |
| 10 |
| 11 ////////////////////////////////////////////////////////////////////////////////
//////////// |
| 12 |
| 13 GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) { |
| 14 fDropsTileOnZeroDivide = false; |
| 15 fFBFetchSupport = false; |
| 16 fFBFetchNeedsCustomOutput = false; |
| 17 fBindlessTextureSupport = false; |
| 18 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; |
| 19 fFBFetchColorName = NULL; |
| 20 fFBFetchExtensionString = NULL; |
| 21 } |
| 22 |
| 23 SkString GrGLSLCaps::dump() const { |
| 24 SkString r = INHERITED::dump(); |
| 25 |
| 26 static const char* kAdvBlendEqInteractionStr[] = { |
| 27 "Not Supported", |
| 28 "Automatic", |
| 29 "General Enable", |
| 30 "Specific Enables", |
| 31 }; |
| 32 GR_STATIC_ASSERT(0 == kNotSupported_AdvBlendEqInteraction); |
| 33 GR_STATIC_ASSERT(1 == kAutomatic_AdvBlendEqInteraction); |
| 34 GR_STATIC_ASSERT(2 == kGeneralEnable_AdvBlendEqInteraction); |
| 35 GR_STATIC_ASSERT(3 == kSpecificEnables_AdvBlendEqInteraction); |
| 36 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kAdvBlendEqInteractionStr) == kLast_AdvBlend
EqInteraction + 1); |
| 37 |
| 38 r.appendf("--- GLSL-Specific ---\n"); |
| 39 |
| 40 r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); |
| 41 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
| 42 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES"
: "NO")); |
| 43 r.appendf("Advanced blend equation interaction: %s\n", |
| 44 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); |
| 45 return r; |
| 46 } |
| 47 |
OLD | NEW |