Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrShaderCaps.h
Go to the documentation of this file.
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#ifndef GrShaderCaps_DEFINED
9#define GrShaderCaps_DEFINED
10
12#include "src/sksl/SkSLUtil.h"
13
14struct GrContextOptions;
15class SkJSONWriter;
16
19
20 void dumpJSON(SkJSONWriter*) const;
21
26
31
33
36 bool fVertexIDSupport = false;
37 // Returns true if `expr` in `myArray[expr]` can be any integer expression. If false, `expr`
38 // must be a constant-index-expression as defined in the OpenGL ES2 specification, Appendix A.5.
40 // frexp(), ldexp(), findMSB(), findLSB().
42 bool fHalfIs32Bits = false;
44 // Use a reduced set of rendering algorithms or less optimal effects in order to reduce the
45 // number of unique shaders generated.
46 bool fReducedShaderMode = false;
47
48 // Used for specific driver bug workarounds
50 // Workaround for Mali GPU opacity bug with uniform colors.
52 // On Nexus 6, the GL context can get lost if a shader does not write a value to gl_FragColor.
53 // https://bugs.chromium.org/p/chromium/issues/detail?id=445377
55 // When we have the option of using either dFdx or dfDy in a shader, this returns whether we
56 // should avoid using dFdx. We have found some drivers have bugs or lower precision when using
57 // dFdx.
59
60 // This contains the name of an extension that must be enabled in the shader, if such a thing is
61 // required in order to use a secondary output in the shader. This returns a nullptr if no such
62 // extension is required. However, the return value of this function does not say whether dual
63 // source blending is supported.
64 const char* fSecondaryOutputExtensionString = nullptr;
65
67 const char* fSampleVariablesExtensionString = nullptr;
68
69 const char* fFBFetchExtensionString = nullptr;
70
72};
73
74#endif
const char * options
#define SkASSERT(cond)
Definition SkAssert.h:116
bool fDstReadInShaderSupport
void applyOptionsOverrides(const GrContextOptions &options)
const char * fSecondaryOutputExtensionString
bool fBitManipulationSupport
const char * fSampleVariablesExtensionString
int fMaxFragmentSamplers
const char * sampleVariablesExtensionString() const
bool fMustObfuscateUniformColor
bool fAvoidDfDxForGradientsWhenPossible
bool fPreferFlatInterpolation
bool fVertexIDSupport
const char * fNoPerspectiveInterpolationExtensionString
bool fRequiresLocalOutputColorForFBFetch
bool fMustWriteToFragColor
void dumpJSON(SkJSONWriter *) const
const char * fFBFetchExtensionString
bool fReducedShaderMode
const char * noperspectiveInterpolationExtensionString() const
bool fHasLowFragmentPrecision
bool fNonconstantArrayIndexSupport
bool fSampleMaskSupport
Definition SkSLUtil.h:98
bool fNoPerspectiveInterpolationSupport
Definition SkSLUtil.h:97