Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GrShaderCaps::PrecisionInfo Struct Reference

Info about shader variable precision within a given shader stage. More...

#include <GrShaderCaps.h>

Public Member Functions

bool supported () const
 Is this precision level allowed in the shader stage?
 
bool operator== (const PrecisionInfo &that) const
 
bool operator!= (const PrecisionInfo &that) const
 

Public Attributes

int fLogRangeLow
 floor(log2(|min_value|))
 
int fLogRangeHigh
 floor(log2(|max_value|))
 
int fBits
 Number of bits of precision. More...
 

Detailed Description

Info about shader variable precision within a given shader stage.

That is, this info is relevant to a float (or vecNf) variable declared with a GrSLPrecision in a given GrShaderType. The info here is hoisted from the OpenGL spec.

Member Data Documentation

int GrShaderCaps::PrecisionInfo::fBits

Number of bits of precision.

As defined in OpenGL (with names modified to reflect this struct) : """ If the smallest representable value greater than 1 is 1 + e, then fBits will contain floor(log2(e)), and every value in the range [2^fLogRangeLow, 2^fLogRangeHigh] can be represented to at least one part in 2^fBits. """


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