Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
SkSL::ShaderCaps Struct Reference

#include <SkSLUtil.h>

Inheritance diagram for SkSL::ShaderCaps:
GrShaderCaps

Public Types

enum  AdvBlendEqInteraction { kNotSupported_AdvBlendEqInteraction , kAutomatic_AdvBlendEqInteraction , kGeneralEnable_AdvBlendEqInteraction , kLast_AdvBlendEqInteraction = kGeneralEnable_AdvBlendEqInteraction }
 

Public Member Functions

bool mustEnableAdvBlendEqs () const
 
bool mustDeclareFragmentShaderOutput () const
 
const char * shaderDerivativeExtensionString () const
 
const char * externalTextureExtensionString () const
 
const char * secondExternalTextureExtensionString () const
 
SkSL::Version supportedSkSLVerion () const
 
bool supportsDistanceFieldText () const
 

Public Attributes

SkSL::GLSLGeneration fGLSLGeneration = SkSL::GLSLGeneration::k330
 
bool fDualSourceBlendingSupport = false
 
bool fShaderDerivativeSupport = false
 
bool fExplicitTextureLodSupport = false
 
bool fIntegerSupport = false
 
bool fNonsquareMatrixSupport = false
 
bool fInverseHyperbolicSupport = false
 
bool fFBFetchSupport = false
 
bool fFBFetchNeedsCustomOutput = false
 
bool fUsesPrecisionModifiers = false
 
bool fFlatInterpolationSupport = false
 
bool fNoPerspectiveInterpolationSupport = false
 
bool fSampleMaskSupport = false
 
bool fExternalTextureSupport = false
 
bool fFloatIs32Bits = true
 
bool fInfinitySupport = false
 
bool fBuiltinFMASupport = true
 
bool fBuiltinDeterminantSupport = true
 
bool fCanUseVoidInSequenceExpressions = true
 
bool fCanUseMinAndAbsTogether = true
 
bool fCanUseFractForNegativeValues = true
 
bool fMustForceNegatedAtanParamToFloat = false
 
bool fMustForceNegatedLdexpParamToMultiply = false
 
bool fAtan2ImplementedAsAtanYOverX = false
 
bool fMustDoOpBetweenFloorAndAbs = false
 
bool fMustGuardDivisionEvenAfterExplicitZeroCheck = false
 
bool fCanUseFragCoord = true
 
bool fAddAndTrueToLoopCondition = false
 
bool fUnfoldShortCircuitAsTernary = false
 
bool fEmulateAbsIntFunction = false
 
bool fRewriteDoWhileLoops = false
 
bool fRewriteSwitchStatements = false
 
bool fRemovePowWithConstantExponent = false
 
bool fNoDefaultPrecisionForExternalSamplers = false
 
bool fRewriteMatrixVectorMultiply = false
 
bool fRewriteMatrixComparisons = false
 
bool fRemoveConstFromFunctionParameters = false
 
bool fPerlinNoiseRoundingFix = false
 
bool fMustDeclareFragmentFrontFacing = false
 
const char * fVersionDeclString = ""
 
const char * fShaderDerivativeExtensionString = nullptr
 
const char * fExternalTextureExtensionString = nullptr
 
const char * fSecondExternalTextureExtensionString = nullptr
 
const char * fFBFetchColorName = nullptr
 
AdvBlendEqInteraction fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction
 

Detailed Description

Definition at line 26 of file SkSLUtil.h.

Member Enumeration Documentation

◆ AdvBlendEqInteraction

Indicates how GLSL must interact with advanced blend equations. The KHR extension requires special layout qualifiers in the fragment shader.

Enumerator
kNotSupported_AdvBlendEqInteraction 
kAutomatic_AdvBlendEqInteraction 
kGeneralEnable_AdvBlendEqInteraction 
kLast_AdvBlendEqInteraction 

Definition at line 31 of file SkSLUtil.h.

31 {
32 kNotSupported_AdvBlendEqInteraction, //<! No _blend_equation_advanced extension
33 kAutomatic_AdvBlendEqInteraction, //<! No interaction required
34 kGeneralEnable_AdvBlendEqInteraction, //<! layout(blend_support_all_equations) out
35
37 };
@ kNotSupported_AdvBlendEqInteraction
Definition SkSLUtil.h:32
@ kAutomatic_AdvBlendEqInteraction
Definition SkSLUtil.h:33
@ kLast_AdvBlendEqInteraction
Definition SkSLUtil.h:36
@ kGeneralEnable_AdvBlendEqInteraction
Definition SkSLUtil.h:34

Member Function Documentation

◆ externalTextureExtensionString()

const char * SkSL::ShaderCaps::externalTextureExtensionString ( ) const
inline

Definition at line 59 of file SkSLUtil.h.

59 {
62 }
#define SkASSERT(cond)
Definition SkAssert.h:116
const char * fExternalTextureExtensionString
Definition SkSLUtil.h:156
bool fExternalTextureSupport
Definition SkSLUtil.h:99

◆ mustDeclareFragmentShaderOutput()

bool SkSL::ShaderCaps::mustDeclareFragmentShaderOutput ( ) const
inline

Definition at line 43 of file SkSLUtil.h.

43 {
45 }
SkSL::GLSLGeneration fGLSLGeneration
Definition SkSLUtil.h:82

◆ mustEnableAdvBlendEqs()

bool SkSL::ShaderCaps::mustEnableAdvBlendEqs ( ) const
inline

Definition at line 39 of file SkSLUtil.h.

39 {
41 }
AdvBlendEqInteraction fAdvBlendEqInteraction
Definition SkSLUtil.h:160

◆ secondExternalTextureExtensionString()

const char * SkSL::ShaderCaps::secondExternalTextureExtensionString ( ) const
inline

Definition at line 64 of file SkSLUtil.h.

64 {
67 }
const char * fSecondExternalTextureExtensionString
Definition SkSLUtil.h:157

◆ shaderDerivativeExtensionString()

const char * SkSL::ShaderCaps::shaderDerivativeExtensionString ( ) const
inline

Definition at line 50 of file SkSLUtil.h.

50 {
53 }
bool fShaderDerivativeSupport
Definition SkSLUtil.h:85
const char * fShaderDerivativeExtensionString
Definition SkSLUtil.h:155

◆ supportedSkSLVerion()

SkSL::Version SkSL::ShaderCaps::supportedSkSLVerion ( ) const
inline

SkSL 300 requires support for derivatives, nonsquare matrices and bitwise integer operations.

Definition at line 72 of file SkSLUtil.h.

◆ supportsDistanceFieldText()

bool SkSL::ShaderCaps::supportsDistanceFieldText ( ) const
inline

Definition at line 80 of file SkSLUtil.h.

Member Data Documentation

◆ fAddAndTrueToLoopCondition

bool SkSL::ShaderCaps::fAddAndTrueToLoopCondition = false

Definition at line 127 of file SkSLUtil.h.

◆ fAdvBlendEqInteraction

AdvBlendEqInteraction SkSL::ShaderCaps::fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction

Definition at line 160 of file SkSLUtil.h.

◆ fAtan2ImplementedAsAtanYOverX

bool SkSL::ShaderCaps::fAtan2ImplementedAsAtanYOverX = false

Definition at line 116 of file SkSLUtil.h.

◆ fBuiltinDeterminantSupport

bool SkSL::ShaderCaps::fBuiltinDeterminantSupport = true

Definition at line 107 of file SkSLUtil.h.

◆ fBuiltinFMASupport

bool SkSL::ShaderCaps::fBuiltinFMASupport = true

Definition at line 106 of file SkSLUtil.h.

◆ fCanUseFractForNegativeValues

bool SkSL::ShaderCaps::fCanUseFractForNegativeValues = true

Definition at line 112 of file SkSLUtil.h.

◆ fCanUseFragCoord

bool SkSL::ShaderCaps::fCanUseFragCoord = true

Definition at line 125 of file SkSLUtil.h.

◆ fCanUseMinAndAbsTogether

bool SkSL::ShaderCaps::fCanUseMinAndAbsTogether = true

Definition at line 111 of file SkSLUtil.h.

◆ fCanUseVoidInSequenceExpressions

bool SkSL::ShaderCaps::fCanUseVoidInSequenceExpressions = true

Definition at line 110 of file SkSLUtil.h.

◆ fDualSourceBlendingSupport

bool SkSL::ShaderCaps::fDualSourceBlendingSupport = false

Definition at line 84 of file SkSLUtil.h.

◆ fEmulateAbsIntFunction

bool SkSL::ShaderCaps::fEmulateAbsIntFunction = false

Definition at line 131 of file SkSLUtil.h.

◆ fExplicitTextureLodSupport

bool SkSL::ShaderCaps::fExplicitTextureLodSupport = false

Enables sampleGrad and sampleLod functions that don't rely on implicit derivatives

Definition at line 87 of file SkSLUtil.h.

◆ fExternalTextureExtensionString

const char* SkSL::ShaderCaps::fExternalTextureExtensionString = nullptr

Definition at line 156 of file SkSLUtil.h.

◆ fExternalTextureSupport

bool SkSL::ShaderCaps::fExternalTextureSupport = false

Definition at line 99 of file SkSLUtil.h.

◆ fFBFetchColorName

const char* SkSL::ShaderCaps::fFBFetchColorName = nullptr

Definition at line 158 of file SkSLUtil.h.

◆ fFBFetchNeedsCustomOutput

bool SkSL::ShaderCaps::fFBFetchNeedsCustomOutput = false

Definition at line 94 of file SkSLUtil.h.

◆ fFBFetchSupport

bool SkSL::ShaderCaps::fFBFetchSupport = false

Definition at line 93 of file SkSLUtil.h.

◆ fFlatInterpolationSupport

bool SkSL::ShaderCaps::fFlatInterpolationSupport = false

Definition at line 96 of file SkSLUtil.h.

◆ fFloatIs32Bits

bool SkSL::ShaderCaps::fFloatIs32Bits = true

Definition at line 100 of file SkSLUtil.h.

◆ fGLSLGeneration

SkSL::GLSLGeneration SkSL::ShaderCaps::fGLSLGeneration = SkSL::GLSLGeneration::k330

Definition at line 82 of file SkSLUtil.h.

◆ fInfinitySupport

bool SkSL::ShaderCaps::fInfinitySupport = false

Definition at line 103 of file SkSLUtil.h.

◆ fIntegerSupport

bool SkSL::ShaderCaps::fIntegerSupport = false

Indicates true 32-bit integer support, with unsigned types and bitwise operations

Definition at line 89 of file SkSLUtil.h.

◆ fInverseHyperbolicSupport

bool SkSL::ShaderCaps::fInverseHyperbolicSupport = false

asinh(), acosh(), atanh()

Definition at line 92 of file SkSLUtil.h.

◆ fMustDeclareFragmentFrontFacing

bool SkSL::ShaderCaps::fMustDeclareFragmentFrontFacing = false

Definition at line 151 of file SkSLUtil.h.

◆ fMustDoOpBetweenFloorAndAbs

bool SkSL::ShaderCaps::fMustDoOpBetweenFloorAndAbs = false

Definition at line 120 of file SkSLUtil.h.

◆ fMustForceNegatedAtanParamToFloat

bool SkSL::ShaderCaps::fMustForceNegatedAtanParamToFloat = false

Definition at line 113 of file SkSLUtil.h.

◆ fMustForceNegatedLdexpParamToMultiply

bool SkSL::ShaderCaps::fMustForceNegatedLdexpParamToMultiply = false

Definition at line 114 of file SkSLUtil.h.

◆ fMustGuardDivisionEvenAfterExplicitZeroCheck

bool SkSL::ShaderCaps::fMustGuardDivisionEvenAfterExplicitZeroCheck = false

Definition at line 123 of file SkSLUtil.h.

◆ fNoDefaultPrecisionForExternalSamplers

bool SkSL::ShaderCaps::fNoDefaultPrecisionForExternalSamplers = false

Definition at line 137 of file SkSLUtil.h.

◆ fNonsquareMatrixSupport

bool SkSL::ShaderCaps::fNonsquareMatrixSupport = false

Definition at line 90 of file SkSLUtil.h.

◆ fNoPerspectiveInterpolationSupport

bool SkSL::ShaderCaps::fNoPerspectiveInterpolationSupport = false

Definition at line 97 of file SkSLUtil.h.

◆ fPerlinNoiseRoundingFix

bool SkSL::ShaderCaps::fPerlinNoiseRoundingFix = false

Definition at line 147 of file SkSLUtil.h.

◆ fRemoveConstFromFunctionParameters

bool SkSL::ShaderCaps::fRemoveConstFromFunctionParameters = false

Definition at line 144 of file SkSLUtil.h.

◆ fRemovePowWithConstantExponent

bool SkSL::ShaderCaps::fRemovePowWithConstantExponent = false

Definition at line 134 of file SkSLUtil.h.

◆ fRewriteDoWhileLoops

bool SkSL::ShaderCaps::fRewriteDoWhileLoops = false

Definition at line 132 of file SkSLUtil.h.

◆ fRewriteMatrixComparisons

bool SkSL::ShaderCaps::fRewriteMatrixComparisons = false

Definition at line 142 of file SkSLUtil.h.

◆ fRewriteMatrixVectorMultiply

bool SkSL::ShaderCaps::fRewriteMatrixVectorMultiply = false

Definition at line 140 of file SkSLUtil.h.

◆ fRewriteSwitchStatements

bool SkSL::ShaderCaps::fRewriteSwitchStatements = false

Definition at line 133 of file SkSLUtil.h.

◆ fSampleMaskSupport

bool SkSL::ShaderCaps::fSampleMaskSupport = false

Definition at line 98 of file SkSLUtil.h.

◆ fSecondExternalTextureExtensionString

const char* SkSL::ShaderCaps::fSecondExternalTextureExtensionString = nullptr

Definition at line 157 of file SkSLUtil.h.

◆ fShaderDerivativeExtensionString

const char* SkSL::ShaderCaps::fShaderDerivativeExtensionString = nullptr

Definition at line 155 of file SkSLUtil.h.

◆ fShaderDerivativeSupport

bool SkSL::ShaderCaps::fShaderDerivativeSupport = false

Definition at line 85 of file SkSLUtil.h.

◆ fUnfoldShortCircuitAsTernary

bool SkSL::ShaderCaps::fUnfoldShortCircuitAsTernary = false

Definition at line 130 of file SkSLUtil.h.

◆ fUsesPrecisionModifiers

bool SkSL::ShaderCaps::fUsesPrecisionModifiers = false

Definition at line 95 of file SkSLUtil.h.

◆ fVersionDeclString

const char* SkSL::ShaderCaps::fVersionDeclString = ""

Definition at line 153 of file SkSLUtil.h.


The documentation for this struct was generated from the following file: