File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ bool atoi_clamp(const char *str, unsigned int *value);
2424namespace sh
2525{
2626
27+ // Keeps track of whether an implicit conversion from int/uint to float is possible.
28+ // These conversions are supported in desktop GLSL shaders only.
29+ // Also keeps track of which side of operation should be converted.
30+ enum class ImplicitTypeConversion
31+ {
32+ Same,
33+ Left,
34+ Right,
35+ Invalid,
36+ };
37+
2738class TIntermBlock ;
2839class TIntermDeclaration ;
2940class TSymbolTable ;
@@ -88,6 +99,11 @@ GLenum GetImageInternalFormatType(TLayoutImageInternalFormat iifq);
8899// ESSL 1.00 shaders nest function body scope within function parameter scope
89100bool IsSpecWithFunctionBodyNewScope (ShShaderSpec shaderSpec, int shaderVersion);
90101
102+ // Helper functions for implicit conversions
103+ ImplicitTypeConversion GetConversion (TBasicType t1, TBasicType t2);
104+
105+ bool IsValidImplicitConversion (ImplicitTypeConversion conversion, TOperator op);
106+
91107// Whether the given basic type requires precision.
92108bool IsPrecisionApplicableToType (TBasicType type);
93109
You can’t perform that action at this time.
0 commit comments